Enter Parameter value (1 Viewer)

irslan rafique

Registered User.
Local time
Today, 12:44
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: 85

Eljefegeneo

Still trying to learn
Local time
Yesterday, 21:44
Joined
Jan 10, 2011
Messages
904
You are referencing a form, and the form isn't open.
 

irslan rafique

Registered User.
Local time
Today, 12:44
Joined
Oct 17, 2014
Messages
26
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.
 

Eljefegeneo

Still trying to learn
Local time
Yesterday, 21:44
Joined
Jan 10, 2011
Messages
904
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.
 

irslan rafique

Registered User.
Local time
Today, 12:44
Joined
Oct 17, 2014
Messages
26
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
 

Eljefegeneo

Still trying to learn
Local time
Yesterday, 21:44
Joined
Jan 10, 2011
Messages
904
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.
 

irslan rafique

Registered User.
Local time
Today, 12:44
Joined
Oct 17, 2014
Messages
26
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
 

Eljefegeneo

Still trying to learn
Local time
Yesterday, 21:44
Joined
Jan 10, 2011
Messages
904
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.
 

Eljefegeneo

Still trying to learn
Local time
Yesterday, 21:44
Joined
Jan 10, 2011
Messages
904
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

Top Bottom