0

New user to this site and found an extremely informative answer to a question I had but can't find an answer to this one.

Using Access 2010, I have 42 different criteria that I need to run individually using the same query. Rather than have 42 queries, or an input parameter dialogue box where I need to enter the criteria 42 times, can I automate this so that the 42 criteria are sourced sequentially from a different table and input to the query using a macro/ module etc. Unfortunately I have no experience of SQL/VBA so am struggling.

Any help would be greatly appreciated.

1 Answer 1

0

If you are searching a single column for 42 different criteria use this method.

  1. Insert a second table into the database listing all the criteria you want to search on.
  2. Add a second column to your new table to identify the order numerically you want to return.
  3. Write a SQL statement to return the results.

SELECT * FROM [Table1], [Table2] WHERE [CriteriaToSearch].Table1 = [Criteria].Table2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .