Enter Parameter value

irslan rafique

Registered User.
Local time
Today, 13:08
Joined
Oct 17, 2014
Messages
26
Hi,
I am trying to create a report, filtered on a combo box(txtname).
This combo box is having a list of names.
I have one query(mainquery) based on a single table(maintbl).
I created a blank form(GenerateReport) with abovementioned combo box(txtname) and a simple button, which will open a simple report.
In mainquery, under names column i am defining the criteria:

[Forms]![GenerateReport]![txtname]

Result:
Report is being filtered accurately.
But when I open query i receive error 'Enter parameter Value'

The screenshot of error is being attached here.

Early guidance will be highly appreciated.

Thanks
 

Attachments

  • Untitled.jpg
    Untitled.jpg
    93.7 KB · Views: 162
You are referencing a form, and the form isn't open.
 
I open related form and it works. But how to fix it.How can I tell my client that you have to open the form then it will run. Moreover after using that parameter nothing appears in the query unless I select some name in txtname.
thanks for the reply and can u help me a little more.
Thanks in advance.
 
I am not sure exactly what you mean. You seem to have done everything correctly according to my limited expertise. You have a unbound form that selects a drivers name and then you run the query. I have not seen your input form, but I expect that you ask the user to select a driver from a drop down list or something similar and then the query runs.

In essence, if you have a parameter query, you have to have input. This can be through a form such as you have built or the user can type in the name manually. I prefer the former as it avoids any errors. A parameter query demands an input.
 
First of all sorry for being away.
You are absolutely right Eljefegeno.. My input form is based on same query but it is totally different form. So can you suggest me please how to fix above mentioned error.

Thanks
 
I am not sure what you mean, but I do not see where you are going wrong. If you have a form, let us say form1 which is the main form and form2 which is an unbound form that the user uses to select the parameter, then reference form2 in your parameter criteria. For ease of use by the end user, I usually make the selection as a drop down list of names, gleaned from the table with the names I want to use. That avoids any typing errors by the user.
 
Again you are right:
input form: mainfrm
unbound form to filter reports: generatereport
both are based on same query.
but when i filter reports using generatereport form: it works fine BUT when i open input form it passes error 'Enter parameter value' and the root of this error is the parameter i used in the query to filter report. At the same time when i manually run the query i cant see any record. So please assist
 
There must be some difference in the data. Suggest you post a stripped down version of the db so I can see what you are doing. If you cannot do that, the post the code for the query using the unbound input form.
 
The criteria for your input form is [Forms]![GenerateReport]![txtname].
The criteria for the query if opened from the input form should be

[Forms]![mainfrm]![txtname]

Does that solve it?
 

Users who are viewing this thread

Back
Top Bottom