Get data from table to use in the query criteria field

rheide

Registered User.
Local time
Today, 17:24
Joined
Jun 12, 2002
Messages
32
I currently have a query that uses the following in the criteria field (1001 Or 1003 Or 1006 Or 1182). If possible (this seems fairly easy but I can't figure it out) I would like to reference a table instead. So for example, if I had a table with one field and four records, I could change 1003 to 1009 and it would update all my queries to use the new number. Any suggestions would be greatly appreciated.

Thanks,
Randy
 
Randy,

Yes you can do that and it works pretty well.

Just go to the "Tables" tab and make a New table. Make a field with the right data type for your code values; 1001, 1003 etc.

Save the table. Open it up and enter the values you want.

Now make a query. Join your "codes" table to your data table on the "code" field. When you run the query, the only rows selected from your data table will be the rows with a value that matches the "codes" table.

When you want different records, open the codes table and manually change the records.

HTH,
RichM
 
Rich,
Worked perfect, not sure how I missed this solution. Thanks again. -Randy
 

Users who are viewing this thread

Back
Top Bottom