Results 1 to 3 of 3
  1. #1
    Kenny is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    2

    Query on a Unbound form with Null Values

    Hi, I have a query that I use with an "Unbound Form". There is approximately 10 fields on this form. I want user to have the ability to search using this unbound form. Some of the field’s don’t need to be searched all the time. How can I write the query so that when a user searches some of the fields and leaves some blank it, will still get the records that they need. In the query design menu I have this code in one of the fields: [forms]![frm Query transparts]![part] what if the user wants to leave this field blank when he is doing a search but he puts data in the others. I dont know VBA..Sorry. Kenny

  2. #2
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662
    Till some one comes along, just check if below gives some guidelines :

    https://www.accessforums.net/showthr...3-Search-Query

    Thanks

  3. #3
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I think this is what you are looking for:

    Queries: Use a parameter to return all records if Null

    http://access.mvps.org/access/queries/qry0001.htm

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

Similar Threads

  1. Query return 0 for null values
    By rachello89 in forum Access
    Replies: 4
    Last Post: 02-23-2012, 08:38 AM
  2. Query not returning null values
    By janelgirl in forum Access
    Replies: 5
    Last Post: 10-11-2011, 10:31 AM
  3. Query with null values
    By Psyclone in forum Queries
    Replies: 3
    Last Post: 03-30-2011, 09:57 PM
  4. Replies: 5
    Last Post: 03-23-2011, 02:28 PM
  5. Null Values in query
    By LesleaOH in forum Queries
    Replies: 0
    Last Post: 10-19-2009, 04:45 PM

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