Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2006
    Posts
    1

    Unanswered: combo box HELP!!!!

    I am passing a combo box selection to a query example [forms].[form1].[combo32]

    When I dont use a combo box selection.. (left empty) I want all the values to be returned.. HAVE TRIED EVERYTHING!! I NEED ALL VALUES>> AND I GET NONE

    PLEASE HELP!

    THANKS!!!
    demetri

  2. #2
    Join Date
    Feb 2004
    Posts
    137
    Try something like the following (make the appropriate substitutions for the highlighted text):
    Code:
    SELECT MyTable.*
    FROM MyTable
    WHERE
      (
        ([forms].[form1].[combo32] Is Null) OR
        ([forms].[form1].[combo32] Is Not Null AND 
         MyTable.MyField = [forms].[form1].[combo32])
      )
    ;

Posting Permissions

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