View Full Version : Parameter Query Using 2 Dates & Second Field


scotty986
06-30-2009, 02:52 PM
I am trying to setup a parameter query using a start and end date
and also a second field.

The date field is fldServiceFollowupDate and I am using the entry
([tblTaServiceFollowup].[ServiceFollowupDate])>=[StartDate]<[EndDate]
in the Criteria line of the query under fldServiceFollowupDate. I have set the
query parameters for StartDate and EndDate to Date/Time.

In addition, I have a second field for consideration in the query.
fldServiceFollowupCheckbox is a checkbox field. I have entered No in the
Criteria under fldServiceFollowupCheckbox.

However, the query is bringing up all of the records with the Checkbox NO and is not considering the date parameters.

How can I combine the two and achieve the results that I want.

Thanks.

Galaxiom
06-30-2009, 03:55 PM
You syntax is not correct. I expect it is showing records where the field is greater than a start date that is in turn less then the end date. Not what you expect.

([tblTaServiceFollowup].[ServiceFollowupDate] BETWEEN [StartDate] AND [EndDate]) AND [tblTaServiceFollowup].[fldServiceFollowupCheckbox] = False

You will have to include more information about the location of the Start and End date fields if they are text boxes on a form. Form!Formname.StartDate

scotty986
07-01-2009, 06:34 AM
Thanks. It works fine now.