Drop Down List Parameter using a Form

G

Guest

I want a drop down list to appear to select the beginning and end date on a
report. I created a Form with a drop down list of these dates. I entered in
the Criteria Filed of the Query [Forms]![Dixie Form]![Beg Date]. When the
paramter box appers, it lists "Forms!Dixie Form!Beg Date" above the parmater
box. If I manually enter the dates it works, but I want a drop down list to
appear. What am I doing wrong?
 
F

fredg

I want a drop down list to appear to select the beginning and end date on a
report. I created a Form with a drop down list of these dates. I entered in
the Criteria Filed of the Query [Forms]![Dixie Form]![Beg Date]. When the
paramter box appers, it lists "Forms!Dixie Form!Beg Date" above the parmater
box. If I manually enter the dates it works, but I want a drop down list to
appear. What am I doing wrong?

The form must be open while the query is run.
How are you opening the form? and the query?
Is the query the final result or are you running a report based upon
the query?
 
G

Guest

I will be setting up a macro to open the form for using on a report where the
parameter box will pop up when the report is opened. I just opened the form
by double clicking on it and the parameter box came up, but it is blank other
than the caption. I then went to open the query and I get a blank data
screen as well.

fredg said:
I want a drop down list to appear to select the beginning and end date on a
report. I created a Form with a drop down list of these dates. I entered in
the Criteria Filed of the Query [Forms]![Dixie Form]![Beg Date]. When the
paramter box appers, it lists "Forms!Dixie Form!Beg Date" above the parmater
box. If I manually enter the dates it works, but I want a drop down list to
appear. What am I doing wrong?

The form must be open while the query is run.
How are you opening the form? and the query?
Is the query the final result or are you running a report based upon
the query?
 
F

fredg

I will be setting up a macro to open the form for using on a report where the
parameter box will pop up when the report is opened. I just opened the form
by double clicking on it and the parameter box came up, but it is blank other
than the caption. I then went to open the query and I get a blank data
screen as well.

fredg said:
I want a drop down list to appear to select the beginning and end date on a
report. I created a Form with a drop down list of these dates. I entered in
the Criteria Filed of the Query [Forms]![Dixie Form]![Beg Date]. When the
paramter box appers, it lists "Forms!Dixie Form!Beg Date" above the parmater
box. If I manually enter the dates it works, but I want a drop down list to
appear. What am I doing wrong?

The form must be open while the query is run.
How are you opening the form? and the query?
Is the query the final result or are you running a report based upon
the query?

It's always best to tell what you want to achieve when posting to a
newsgroup. We aren't mind readers, and the method when used in a
report is different than the simple original question you asked.

Create an unbound form.

Also add 2 unbound text controls.
(You can use your drop-down controls here.)
Set their format to a valid date format.
Name them "StartDate" and "EndDate"

Add a Command Button to the form.
Code the button's click event:

Me.Visible = False

Name this form 'ParamForm'.

As criteria in the query date field write:
Between forms!Paramform!StartDate and forms!ParamForm!EndDate

Next, code the report's Open event:
DoCmd.OpenForm "ParamForm", , , , , acDialog

Code the report's Close event:
DoCmd.Close acForm, "ParamForm"

When ready to run the report, open the report.
The form will open and wait for the entry of the starting and ending
dates wanted.
Click the command button and the report will run.
When the report closes, it will close the form.
 

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