Parameter

  • Thread starter Thread starter Fie
  • Start date Start date
F

Fie

Hey,

Can anyone help me, is there anyway that you can bypass a patameter
that has been set up...
I have set up parameters for user to enter customer name, start date &
finsh date. IS there anyway that when this query is run, the user can
sometimes bypass the customer name and just enter in the dates so then
the results are displayed are listing all the customers between dates
entered.???


fie
 
Fie

I am under the impression that if I don't enter a value in a parameter
prompt, that's what gets used. You might need to change the selection
criterion to something like:

Like * & [your parameter prompt] & *

Note that there's a difference between prompting for a Null and prompting
for all values contained.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP
Microsoft IT Academy Program Mentor
 
Assumption:
Customer Name ALWAYS has a value in it.

Field: [Customer Name0
Criteria: Like NZ([Specify Customer:],"*")

IF Customer Name can be blank then you need to use criteria like that below.
Field: [Customer Name]
Criteria: Like [Specify Customer:] OR [Specify Customer:] Is Null

Be warned that when you save this query Access will rearrange the criteria
into multiple lines. The technique will work, but you can end up with query
too complex problems if you are applying criteria to more than 3 or 4
fields.
 
Also, be aware that if your users are fat-fingered (as I am), or have poor
memories (as I do), or enter "Bob Smith" when you've saved "Robert A.
Smith", you WON'T get a match.

You might want to consider using a form to collect your query search
criteria, and in your query, refer back to the form. This would allow you
to use a combo box on the form and let the user select the correct Customer,
not have to enter it correctly.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP
Microsoft IT Academy Program Mentor

Jeff Boyce said:
Fie

I am under the impression that if I don't enter a value in a parameter
prompt, that's what gets used. You might need to change the selection
criterion to something like:

Like * & [your parameter prompt] & *

Note that there's a difference between prompting for a Null and prompting
for all values contained.

--
Regards

Jeff Boyce
Microsoft Office/Access MVP
Microsoft IT Academy Program Mentor

Fie said:
Hey,

Can anyone help me, is there anyway that you can bypass a patameter
that has been set up...
I have set up parameters for user to enter customer name, start date &
finsh date. IS there anyway that when this query is run, the user can
sometimes bypass the customer name and just enter in the dates so then
the results are displayed are listing all the customers between dates
entered.???


fie
 
Back
Top