Results 1 to 7 of 7
  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 (Access 2000)

    Hi everyone...

    I have a database I'm attaching that deals with employees taking classes. I have a status field that represents whether an employee is eligible to take certain classes or not...for example:

    S = Supervisors
    NS = Non-Supervisors
    AE = All Employees
    AA = Administrative Assistants

    I am trying to run a query using parameters that allow one to type in either S, or NS, or AE or AA and get the proper employees information on screen. Right now i can get AE employees and NS employees enough but the AA and the S employees come up with everyone else...and don't want to run filter on query.

    Could someone look at the "qryEnterStatus" in this database and tell me how to work this parameter question to make it work correctly.

    Thank you so much for your time

    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
    Star Lounger
    Join Date
    Jan 2003
    Location
    Manchester, Lancashire, England
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Parameter query (Access 2000)

    Instead of selecting on Status try a new field with definition such as Expr1: InStr([Status],[Enter Status]) with criteria set to >0

  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 (Access 2000)

    Thanks for the reply. Not sure what you mean by "with condition set to >0"
    I made a new column and entered the expression, but it just gives EVERYONE when for example I type S as criteria.
    Maybe I am not reading your response correctly.
    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>

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

    Re: Parameter query (Access 2000)

    I modify the quey in the idea of iandouglas, but add / to separate the status.
    Hope this is what you want.
    Francois

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

    Re: Parameter query (Access 2000)

    Ok...let me think

    S = Supervisor
    NS = Non Supervisor
    AE = All Employees
    AA = Administrative Assistants

    When I type S I get anything with S in it...I only want S group
    When I type AA I get anything with AA in it...I only want the AA group
    When I type NS I get anything with NS in it...I only want the NS group
    When I type AE I seem to be getting those with just AE...not sure why...but that is good

    Maybe there is a better way to set the STATUS field up in the table so it works better, but at this moment I am at a loss. Because some employees might be S status while others might have S and AE status, and then others might have S and AE status and others NS AA and AE status...does this make sense?

    Any suggestions on how to tag each employees status other then how I have them already in the employee table? Or any other suggestions that might make the query give me what I need as mentioned above.

    NMP (Thank you so much for any replies)
    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>

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

    Re: Parameter query (Access 2000)

    The query I have modify should do that.
    Francois

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

    Re: Parameter query (Access 2000)

    OK...now I see. Dummy me! Thank you. It does work and works fine. I just wasn't looking at what I received after typing what I was after correctly. It does give me the correct results.

    Thank you Francois...As Always I salute you!!! <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
  •