Parameter value

fathyano

Registered User.
Local time
Today, 01:02
Joined
Jun 1, 2009
Messages
16
I have made a button, giving it the order to open a report, applying a certain filter of this report.

The criteria of this query is to let the user specify the input (i.e: - start date, then end date) and return the records occured during this period.

when I press this button, I find the famous message asking me to ENTER PARAMETER VALUE.

HOW TO REMOVE THIS ANNOYING MESSAGE????

thanks in advance
 
Open the query in design view, right click on it and select parameters. You should be able to remove them here.

Hope this helps

Q
 
What code are you using to open the report? Also, if you have Between [Enter Start Date] and [Enter End Date] in the query itself as criteria then it would likely ask for those regardless of whether you have set them on the form. But if you set the code for opening the report to include those, as long as you spelled them both exactly the same, they should open once. So it is important to see the code you use to open the report and to see if you have any criteria in the query itself.
 
Howzit

In the underlying query replace the parameters by linking them to the controls on your form.

Code:
between [Forms]![yourform]![yourfield] and [Forms]![yourform]![yourfield2]
 
Howzit

In the underlying query replace the parameters by linking them to the controls on your form.

Code:
between [Forms]![yourform]![yourfield] and [Forms]![yourform]![yourfield2]
Actually, I would argue that he should remove the criteria from the query itself and then pass the particular Where clause he wants at run time when opening the report. It makes for a much more GENERIC report that can be opened in many different ways and doesn't limit you to those date selections.
 
Double check the spelling. Open the report to see how the parameter is spelled, then look for that spelling in the query.

Or, go to the design mode for the report, and check that the grouping and sorting is correct. If it's not the spelling, then it is probably the grouping or sorting. I've gotten stuck on that forever once, but now that is the second thing I check when I run across your problem.

PS-Keep in mind what SOS said about your parameter. If the parameter in the query is [Enter Date], then naturally, you will be prompted to enter that date. It seems like you are trying to enter the date into a control on the form, and use that as the parameter. If this is the case, your query should not say [Enter Date], it should actually more like this:

[Forms]![YourFormNameHere]![YourControlNameHere]

There may be a .value at the end of that. I don't remember, but I don't think so.

Good luck!
 
Actually, I would argue that he should remove the criteria from the query itself and then pass the particular Where clause he wants at run time when opening the report. It makes for a much more GENERIC report that can be opened in many different ways and doesn't limit you to those date selections.

I like this method too. Probably the better approach. Another benefit of your way is that if the report is opened from any places in the db, besides this form he is working on, there will be an error if he places the form control as criteria in the query, assuming the form in question is not open. Your advice avoids that problem!
 
Howzit

Good point - I've just realised this is a prolem in one of my db's and couldn't figure a way around it.

Hiding in plain sight really gets me.

Actually, I would argue that he should remove the criteria from the query itself and then pass the particular Where clause he wants at run time when opening the report. It makes for a much more GENERIC report that can be opened in many different ways and doesn't limit you to those date selections.
 

Users who are viewing this thread

Back
Top Bottom