Return ALL records

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KMEscherich
    New Member
    • Jun 2007
    • 69

    Return ALL records

    Hi there, am using Access 2002 and am wondering if there is a way to set up a query so that if I don't make a selection for a parameter such as a department code, I would see all records, and if I do make a selection, I would only see records pertaining to that particular Department Code I selected. Am not sure if Access can do this or not.

    Thank you VERY MUCH for your assistance.

    KEscherich
  • jaishu
    New Member
    • Mar 2007
    • 22

    #2
    Yes you can do that, but not very clear about your question, are you trying to display it in a form??

    if you are using a query then , make your form's record source as "select * from table", and if you want it selectively, you can use filter..
    hope this helps...????

    Comment

    • FishVal
      Recognized Expert Specialist
      • Jun 2007
      • 2656

      #3
      Hi, KEscherich.

      I guess so far your query looks like
      [code=sql]
      ..... WHERE [SomeField]=[Parameter] ...
      [/code]
      Change it to
      [code=sql]
      ..... WHERE [SomeField]=[Parameter] OR IsNull([Parameter]) ...
      [/code]

      Regards,
      Fish

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32668

        #4
        You could try :
        [code=sql]..... WHERE [SomeField] LIKE [Parameter] & '*' ...[/code]
        but this is really only for string fields.

        Comment

        Working...