Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pasting values into a query

Status
Not open for further replies.

Firedart

Technical User
Feb 24, 2009
2
GB
Basically I have a list of numeric values in a column in excel, called IssueID. I also have an Access Database with the IssueID column, and lots of data related to the issue.

I want to be able to copy the IssueIDs from excel directly into an input box in access, which then queries the database and brings back the full records with those IssueIDs.

Anyone know how to do this?

Thanks!
 
You could build your own query using a textbox. Let us say you also have a subform to display these records.

Code:
strSQL="SELECT * FROM tblIssues " _
& "WHERE IssueID IN (" & Me.txtListOfIssueIDs & ")"

Me.sfrmIssues.Form.RecordSource=strSQL

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top