Enter Parameter Value

traceya

Registered User.
Local time
Today, 20:00
Joined
Aug 29, 2012
Messages
12
I have a form that uses a value list as the row source for a combo box. This works fine.
I then added this form as a sub form of another form. When I open the form I get an error message to "Enter Parameter Value".
Why is this happening and what do I need to do to remove the error message?
Thanks
 
Have you got a query (with a criteria) ??
Did the subform link on this query ??
 
The subform is called fmSalesOrderDetails

The row source for the combo box (Combo9) on this subform is a value list: "Antique";"Reproduction"

The row source for an autofill combo box (ProductCode) on the same subform is:
SELECT distinct tblProducts.ID, tblProducts.Description, tblProducts.RetailPrice FROM tblProducts WHERE (((tblProducts.AntiqueRepro)=[forms]![fmSalesOrderDetails]![Combo9])) UNION select distinct null, null, null FROM tblProducts ORDER BY tblProducts.Description;

I then have a text box on the subform which also autofills based on the Combo9 box. The control source for this is:
=CCur([ProductCode].[Column](2))

The Enter Parameter error box message reads:
forms!fmSalesOrderDetails!Combo9
 
As I can understand you, you have to have something in Combo9,
(Antique or Reproduction).
It would be better to send a short example of your "mdb" (Access 2000 or
2002-2003), and tell what you want to do.
 
If the control is on a subform it cannot be referred to via the Forms Collection and form name but via the mainform that hosts it.

Forms.mainformname.subformcontrolname.Form.Combo9
 
Hi Galxiom


Thanks for the reply


I now have the following code in the row source for ProductCode, but am still being asked to enter a parameter value. Is the syntax I'm using correct?


SELECT distinct tblProducts.ID, tblProducts.Description, tblProducts.RetailPrice FROM tblProducts WHERE (((tblProducts.AntiqueRepro)=forms.fmSalesOrder.fmSalesOrderDetails.Form.Combo9)) UNION select distinct null, null, null FROM tblProducts
ORDER BY tblProducts.Description;


Thanks
Tracey
 
Try running it as an ordinary query and see if you get the same prompt.

Note that the name of the subform control is not necessarily the same as the subform object it contains. (However it would normally be if you used the Wizard to create it.)

Perhaps you have changed the name of the form since you created it?

Another check is to type the following expression into the Immediate window then work back removing objects until you get one that works like this:

Code:
? Forms.fmSalesOrder.fmSalesOrderDetails.Form.Combo9.Name
 
? Forms.fmSalesOrder.fmSalesOrderDetails.Name
 
? Forms.fmSalesOrder.Name

This will reveal where you have the invalid reference.
 

Users who are viewing this thread

Back
Top Bottom