Show "ALL" Records

C

calmo

I'm using a form and query to bring up records from a table between selected
dates. I've used the query to ask the user to input the "start" and "finish"
dates, but I also want the user to be able to select either a single
contractor or all of the records by using a combo box on the form. Anybody
help?!

Cheers
 
O

Ofer Cohen

You can create a form with two text boxes, start date and end date, instead
of prompt when the query run, it's better that way because the user wont have
to input both dates every ime the query run's, and in addition you can create
defaults fr the date.
Also, in the form create a combo to select a contractor, end if no
contractor was selected the query will return all of them

something like

Select * From TableName Where DateField Between
Forms![FormName]![StartDateTextBox] And Forms![FormName]![EndDateTextBox] And
contractor Like Nz(Forms![FormName]![contractorComboName],"*")
 

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