Parameter query

  • Thread starter Thread starter John Baker
  • Start date Start date
J

John Baker

I am trying to create a parameter query based on a date field but am having
problems with the criteria.
I would like to get all records which have a date greater than the date
entered as a parameter but if the parameter is null then I want all records.
The parameter is a textbox on the form which calls the query.
At the moment I can't seem to get all records whether they have a date or
not. ie some records have a null date


Any help greatly appreciated.

John Baker
(e-mail address removed)
 
Hi

Try ">[Name Of Text Box] Or [Name Of Text Box] Is Null" as
the parameter text. That should do the trick.

By the way, this technique has its uses but if you want to
have multiple parameters specified by text boxes, each of
which can be left Null and still return records, it gets
really really tricky. In that situation, I would use
Visual Basic to build a string, based on what is in the
text boxes, which then gets set to the Filter property for
a form which shows the results. It takes a bit of
programming but you'll find it's easier than designing a
really complicated query.

Cheers

David Cleave

www.logistics.nhs.uk
 
Back
Top