Two different Filter criteria

G

Guest

strwhere = "area_mensbballocker = " & True _
& " AND " _
& "[EventDate1] between #" & Me.txtStartDate & "# AND #"
& Me.txtEndDate & "#"

-----Original Message-----
I have a form that opens a report depending on the option selected from the combo box.
The combo box opens a report for rooms in use depending
Case "area_mensbballocker"

strwhere = "area_mensbballocker = " & True
DoCmd.OpenReport "RPT_rooms", acViewPreview, , strwhere

The area is a check box data field. This works perfect.
I want to be able to set a date range also so that a data
range can be entered and display all activity in that room
for a given date period. The following code is what I
have used on other forms that works great:
strwhere = "[EventDate1] between #" &
Me.txtStartDate & "# AND #" & Me.txtEndDate & "#"
DoCmd.OpenReport "Rpt_MonthlyUse", acViewPreview, , strwhere

txtStartDate and txtEndDate are the names for the text
boxes used to enter the date range.
The question I have is how do I combine the strwhere
field to handle the 2 different criteria? Is this even
possible? I hope this makes sense.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top