Drop down box -- select all option

V

Vernon

Good morning,

I have a form which is used to retreive records given four
user-specified criteria:
1. Record created after a given date
2. Record created before a given date (these first
criteria allow for a range of dates to be retreived)
3. Record is for a given jurisdiction.
4. Record is for a given zone.

The first two criteria are inputted as date fields. The
last two, jurisdiction and zone fields, are drop boxes
referencing tables "tbl_Jurisdiction" and "tbl_Zone".
Each of these tables include a range of choices, i.e.
jurisidiction
gives "Mayfield" "Fremont" "Lakewood" "Unincorporated
County"

My question: is there anyway to include an "All" option
within the Jurisdiction and Zone fields so that users
could query ALL records within a given range of dates
(rather than records for a specific jurisdiction/zone)?

Any help would be appreciated!
Any questions or clarifications email (e-mail address removed)

Kendra
 
A

Adrian Tofan

one option could be to Add an All option to each dropdown list (using a
Union query for the recordsource of each drop down list) and adapt the Where
clause of your recordset.

in this case your Where clause would look like:

WHERE ([YourDate] Between " & Me.txtStartDate & " AND " & Me.txtEndDate &
") AND
([Zone_Desc] = '" & Me.cboZone & "' OR '" & Me.cboZone & '" = 'All' ) AND
([Jurisdiction_Desc] = '" & Me.cboJurisdiction & "' OR '" &
Me.cboJurisdiction & '" = 'All' )
 

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