Dialog box with a Date filter

E

Eleonora

Hi,

I have a dialog Form with a combo box used to select a record in a table and
via a command, I bring up a Report.

I would like to add two Date fields in the dialog Form (From/To) as a filter
so that the Report information can be confined within the Date period
selected.

How would I go by?

I have Acc connected to SQL2k and the Report information is pulled from a
View.

TIA

Eleonora
 
C

Cynthia

Let's say your form is called frmDialog. Place your date
fields on the form. Name one field date1 and the other
date2.

Create a SELECT query that will pull the fields for your
report. Under the date field that corresponds to the date
field of your report place this as the CRITERIA:

Between frmDialog.date1 AND frmDialog.date2
Make this query the RECORDSOURCE for your report.

When you click the command that opens the report it will
filter by the dates in frmDialog.
 

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