Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jan 2003
    Location
    Dallas, Texas
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Parameter Query (2000)

    I have created a Select Query that is set up so the user can type in a range of account numbers and a department number. The result is all accounts in that range that are assigned to the requested department. So far, so good. However, there are times when what is needed is all accounts in that range, no department designated. The query as it stands comes up blank if no department. is designated. Right now I have a separate query for accounts only. Is there a way to make one query work for both situations?

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Parameter Query (2000)

    Hans has supplied this solution before, so your WHERE clause should probably look like:
    WHERE Department like [Enter Department] & "*"
    or:
    WHERE Department like [Enter Department] or [Enter Department] is Null

    Pat <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  3. #3
    2 Star Lounger
    Join Date
    Jan 2003
    Location
    Dallas, Texas
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Parameter Query (2000)

    Oh, I'm going to LOVE this site. It does exactly what I wanted <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15>

Posting Permissions

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