From Form to Report

Deirdre Marie

Access in Excess
Local time
Today, 12:45
Joined
Sep 17, 2001
Messages
34
Greetings~

I wish to create a form that will launch a report based on a user's input for particular fields.

One of the fields is from a list box I have created which lists the options available.

The other field would be a date range.

e.g. I would like to see all the sales of Laura Smith from 01/13/02 to 02/06/02.

The user would select "Laura Smith" from the list box and would input the date range.

The reason I would like to set this up via form is the list box. The data stored for the reps name is not exactly the reps name. For instance, Trokanowski is in the DB as Trok and the user would not know this. However if the user sees "Trok" in the list box, he/she will know it represents Trokanowski.

Your assistance is appreciated and I thank you in advance.

~Deirdre
 
Create a form with two unbound fields called StartDate and EndDate (or whatever you like). Add your combo box. Add a command button to open the report. In the criteria for the date field in the query put code like this:

Between [Forms]![YourFormName]![StartDate] And [Forms]![YourFormName]![EndDate]

In the criteria for the Name use:

[Forms]![YourFormName]![ComboBoxName]

Be sure that the name you want to use in the criteria for the name is the first and bound column in your combo box.
 
Thank you ever so much!

Now I'm off to make it pretty
wink.gif


:: cheers ::
 

Users who are viewing this thread

Back
Top Bottom