Filtering a Form

DebbieV

Registered User.
Local time
Today, 21:36
Joined
May 7, 2002
Messages
63
I am trying to create a form where the user can enter a begin date and end date to filter information that would be displayed on a report. Like we see in the Northwinds example. I see that a form was created in design view with unbound text boxes and a command button linking it to open a particular report. I cant' figure out what to do to make it filter the data for the date range I put in. It just give me all the data. I thought that I should crate a macro with Open Report and complete the arugments in the macro window like Report Name, View, Filter Name and Where condition. Although in the Northwinds example I don't see where a macro was created. Please let me know the best way to accomplish this task.

Debbie V
 
Base your reports record source on a query and set the criteria for the date field to something like :

Between [Forms]![form_name]![fld_BeginningDate] And [Forms]![form_name]![fld_EndingDate].

HTH

Smed
 
Thanks smed,

I tried what you said. I got the query and the report to work but when I use the date range form it will not display the correct data based on the range of dates I entered. It just says error where the data should be. I am finding out that this date range form will go blank if I change the record source to to the query or the report. Not sure what I am doing wrong, hope you can help.

Debbie
 

Users who are viewing this thread

Back
Top Bottom