Asking for inout in querys

SFCMatthews

Registered User.
Local time
Today, 02:46
Joined
Feb 3, 2012
Messages
44
I have a query that when ran I would like it to ask for input. I need it to show one of the records that is required for eveyone all of the time, and still ask for input for additional records that are only required for a selected few.​

Example:
Show "A" all of the time
user inputs "B", "C", or "D"
Query show recordes from "A", and user input​

SQL Code: Like "*" & [Enter Command] & "*" & " Core Task"
"Core Task" is the "A" form the example above.​
 
Last edited:
Create a new element in your query like this:

ValidData: IIf([YourFieldNameHere]='A' OR [YourFieldNameHere]=[Input Your Query Criteria Here], 1,0)

Then underneath in the criteria section put a 1.

You will need to change [YourFieldNameHere] to the name of the field that contains the values A, B, C, etc. Leave the [Unput Query Criteria Here] alone and when the user runs the query it will bring up a prompt with that text that will allow them to enter their criteria.
 
Thank you it worked perfectly.
 
Last edited:
The query and from are working, but a button assigned to the report on the form is not working. How do I get the report to open based on the users input on the form.

Example:
* Open form
* it ask for input
* form opens and show the recordes the users requested on the form
* user needs to print requested recordes
* click button
* report is runs with only the recordes the user requested
 

Users who are viewing this thread

Back
Top Bottom