Dialog box with a Date filter

  • Thread starter Thread starter Eleonora
  • Start date Start date
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
 
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.
 
Back
Top