Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Parameter query when blank (Access 2000)

    Hi all!!!

    Have a Parameter query question. Am attaching a simple database example that has the troublesome query in question in it. Could someone explain how:

    1. If I have a Parameter query and want to ask it more then one question how can I get these prompts to behave if someone doesn't enter data into one of the parameter prompt boxes?

    2. Example: If I want to enter "Admin" into the first prompt for Department box, but skip the second parameter prompt which asks for Position all together...to still get the people in Admin to show up...

    OR

    3. If I want to skip the first box which asks for Dept (don't want to enter Admin or Sales, but leave blank), and enter "Clerk" into the second parameter box, I would like all my clerks to show up.

    This is not a query that needs to be based on another query is it?

    Any suggestions. Thanks for taking a peek at the example I'm attaching.

    NMP
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Parameter query when blank (Access 2000)

    Use as criteria :
    Like "*" & [Enter a Dept Or Leave Blank to Display All]
    Like "*" & [Enter a Position Or Leave Blank to Display All]
    on the same line.
    Remove the two last columns in the query you have.
    Francois

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Jacksonville,NC, USA
    Posts
    705
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Parameter query when blank (Access 2000)

    Francois,

    Thank you! Worked great. Do not know why I didn't think of using the like command with a "wildcard". One of those days I guess, because I just didn't!

    As always...I salute you at Woody's Lounge! Fastest most reliable help anyone could ask for. <img src=/S/salute.gif border=0 alt=salute width=15 height=20>

    NMP
    NMP <img src=/S/cool.gif border=0 alt=cool width=15 height=15>

    If you can't convince them, confuse them. - Harry Truman <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •