Using Table to pass paramters

bconner

Registered User.
Local time
Today, 14:25
Joined
Dec 22, 2008
Messages
183
I have an access table that holds parameters that I want to pass to a query....

Example:

TableParameters

Grp# / trackingStartDate / Payor
4 | 5/1/2010 | 1105
5 | 6/1/2010 | 335
7 | 4/30/2010 | 1

I would like to use the data in the TableParamters as the criteria for my query against the main table that holds payments....

So for example I want to say in the query for group 4 above only pull payments for Payor 1105 on or after 5/1/2010 etc....
 
Where did you get the idea of storing parameters in tables? This seems to me to be a bad idea. Not only do you have to actually populate the table you then ahve to filter that table to get the parameters you want. THEN apply this filter to another query. Total overkill. I suggest you look into passing parameters to public variables for use in queries/forms/reports. A perfect example is in the Sample Database section and irt comes with full documentation.
 
I've used a similar concept on occasion when I want to keep those variables (for future use after the DB has been closed and restarted, maybe weeks later). They are really settings or options. So in your case, the query would be linked to this table and something to tell it the record you want to use. I usually have it set up with a yes/no field in the table that I turn on/off in a form. I usually want the option of selecting multiple records so if you only wanted to be able to select one, you'd have to program that into your solution. I've also used it where I ensure there is only one record and various fields stored.
 

Users who are viewing this thread

Back
Top Bottom