Results 1 to 4 of 4
  1. #1
    scorpion99 is offline Novice
    Windows 7 32bit Access 2002
    Join Date
    Nov 2013

    Search not working in my form

    Hi all,

    I have a problem in my database (see attached) where the search button doesn't work in the form, can somebody take a look of it and tell me what's wrong?
    Attached Files Attached Files

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Your current query is a big AND statement.
    to make an OR statement, put each field criteria on a separate line

    Click image for larger version. 

Name:	Search OR.png 
Views:	14 
Size:	6.9 KB 
ID:	18621

  3. #3
    JeffChr is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2014
    If you take the phone number out of the query it works. You can't search for null.

  4. #4
    ssanfu is online now Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Anchorage, Alaska, USA
    Actually, you can (kinda) search for null.... see

    There were several things wrong..... the "ID" field is an autonumber and shouldn't be visible to users, so I deleted the control on the form.

    Here is some info on autonumbers:
    What they are NOT and What They Are

    Microsoft Access Tables:
    Primary Key Tips and Techniques

    Use Autonumbers properly


    You had the default value for the controls on the form set to "--". I removed the default values.
    I modified the query like the link above.
    I also changed the "Clear" code; set the controls to Null instead of an empty string.

    I prefer to build the filter on-the-fly: see

    You shouldn't use spaces, puncutation or special characters (exception is the underscore) in object names
    "Veni, Vidi, Velcro"
    (I came; I saw; I stuck around.)

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 09-29-2014, 03:23 PM
  2. Search Form drop down fields not working
    By wnicole in forum Access
    Replies: 1
    Last Post: 09-19-2013, 07:43 AM
  3. Replies: 6
    Last Post: 07-19-2012, 11:43 AM
  4. Replies: 5
    Last Post: 04-06-2012, 11:06 AM
  5. Search Button in a Form not Working
    By spideynok in forum Forms
    Replies: 30
    Last Post: 03-29-2012, 01:10 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Other Forums: Microsoft Office Forums - Senior Forums