Parameter Query

utzja1

Registered User.
Local time
Today, 14:57
Joined
Oct 18, 2012
Messages
97
I have several parameter queries in my DB. What is the most straightforward way to force the user's parameter value to be a member of a particular field in the database? I'd like to alert the user that they have asked for a report on an asset that isn't in the DB, then give them the opportunity to re-enter a value or cancel out of it.

Many thanks for your help. I'm hoping this is a softball question for someone on a Friday afternoon.
 
Build a new query without parameters. Build a form. On that form put a drop down that selects all the valid values for a field. Put a button that when clicked opens that query applying the value they have selected.
 
Thanks, this query was already being launched from a form, so maybe the answer is already close-by. Thanks for the suggestion!
 
Just create a form (Datasheet View) for this query and then your other form can open it simply by using the method like this:

Code:
DoCmd.OpenForm "FormNameHere", acViewDS, , "[FieldName]=" & Me.Something

You can have multiple criteria if necessary and if it is a date be sure to format it in either the 03 Jun 12 format or U.S. Date format and use # surrounding the form reference. If the field is text it needs quotes.
 

Users who are viewing this thread

Back
Top Bottom