Access - find records from list
Hi,
I'm guessing this is really easy, but i'm completely new to access/sql.
I have a list of Case ID, from a specific area.
and i want to run a query to pull back info on the cases in the list.
at the moment i am inserting into cells in excel:
=A1&" or "
=B1&A2&" or "
and dragging these formulas down then copying the values in to my access query
the above method is limited as the query will only allow me to insert a certain number of characters, so it's a complete nightmare shortening the formula down every 40 or so cells
especially when i have over 2000 cases :(
i'm guessing there is an easier way
ie just pasting the case ids using the "IN" operator in SQL
so i'm hoping one of you guys could help me, and show me a tut or a solution to my problem
many thanks
Mitch
Re: Access - find records from list
what is it that you need to transfer your data to excel to accomplish? Can you post some of your existing code? The query code thats only allowing 40 chrs?
Re: Access - find records from list
Re: Access - find records from list
Thanks for your response
it's basically, when i go in to design view for my query
i want to be able to search for more than approx 25 cases at a time
each case id is 11 digits long, so i put in to the criteria section of the query
"12345678912" or "12345678913 or" etc
what i want to be able to do is paste the whole list of case id's that i have, in to the query instead of having to do multiple queries
i will look at your links posts rob,
Thanks again
Mitch
Re: Access - find records from list
1. Create a Search Table with only one field ID with the same data type as in Main Table.
2. Paste all IDs you want to search for into ID field of Search Table.
3. In design view of the query, add both tables then join two ID fields of them by draging one to another.
4. Select all the fields from the Main Table you want to display.
By this way you can have as many as IDs you want to search for.