ACCESS 2003 - Search Qurey Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Im in the process of creating a reference database of about 1000 different reference articles. I want to create a search form where I can prompt the user to enter multiple search criterium. The problem is that the way they instruct you to do so on the access web site does not allow for some of the search fields to be left blank. If they are the search will just return a blank query. Does anyone know how I can make my search query allow blank fields? Thanks a lot
 
For each separate condition create a clause enclosed in parentheses. Then combine the clauses with the AND operator:
(fld1 = Forms!YourForm!txtfld1 OR Forms!YourForm!txtfld1 Is Null) AND (fld2 = Forms!YourForm!txtfld2 OR Forms!YourForm!txtfld2 Is Null) AND (fld3 = Forms!YourForm!txtfld3 OR Forms!YourForm!txtfld3 Is Null)

The parentheses are CRITICAL because you are combining AND and OR conditions. Each OR clause must be enclosed in parentheses.
 
On Wed, 28 Jul 2004 11:59:05 -0700, "Dan B" <Dan
Im in the process of creating a reference database of about 1000 different reference articles. I want to create a search form where I can prompt the user to enter multiple search criterium. The problem is that the way they instruct you to do so on the access web site does not allow for some of the search fields to be left blank. If they are the search will just return a blank query. Does anyone know how I can make my search query allow blank fields? Thanks a lot

You may want to look at EndNote or one of the other commercial
reference database packages. They've got a LOT of features which would
take years of work to implement in Access; and they have good student
rates (guessing that you're a student of course).
 
Back
Top