Enter Parameter Value???

mchris

Registered User.
Local time
Today, 05:28
Joined
Sep 12, 2004
Messages
18
I'm trying to design some cascading combo boxes for a form.

The tables I'm using are as follows.

tblProdType

lngProdTypeID.........primary key
chrProdType

tblProductInfo

lngProdID.........primary key
chrProductName
chrProdTypeCR......this is for commission purposes
chrState
lngProdTypeID......foreign key

I have a form with two combo boxes. Both have properties as follows:

ColumnCount = 2

The SQL for the first combo box is as follows:

SELECT tblProdType.lngProdTypeID, tblProdType.chrProdType
FROM tblProdType
ORDER BY tblProdType.chrProdType;

The SQL for the second combo box is as follows:

SELECT tblProductInfo.lngProdID, tblProductInfo.chrState
FROM tblProductInfo
WHERE (tblProductInfo.lngProdTypeID)=[FORMS]![frmSaleProductInfo]![cboProdType]
ORDER BY tblProductInfo.chrState;

Also, the AfterUpdate event for the first combo box contains this code:

me.cboState.Requery

When I try to use the combo boxes I get a message box asking me to enter a parameter. The text is as follow:

Enter Parameter Value

Forms!frmSaleProductInfo!cboProdType

I've been working on this for like 4 hours. I'm complete new to this, but I have this exactly as all the FAQ's I've seen do as well.

What am I missing???

Thanks.
 
Check the spelling of the form and combo box names.

When Access asked you to enter a value for the parameter Forms!frmSaleProductInfo!cboProdType, it meant Access couldn't find frmSaleProductInfo in the collection of forms that were open.
.
 
The names are spelled correctly. The form frmSaleProductInfo is the same form that contains the combo boxes...so, doesn't that mean the from is open?
 
Resolved

thanks...I copied your text and it worked fine..I must have had an extra character somewhere..I looked it over 1000 times I just overlooked it. I still haven't found the problem

Either way,

thanks
 
[Unresolved]

I've got the combo boxes to work. I just used your code and linked forms instead of a subform. Job done.

Know I have a different problem. For some reason I can't have multiple entries. Here's an example.

The cascading combo boxes first choose the product type (pen, pencil, paper, etc) the next combo box chooses the specific product (for pens...blue, black, red, multi...etc).

Now, once I enter the first product and the next row of combo boxes pop up...I have a problem. Let's say the first set of combo boxes chooses pen, blue. When I choose the value for the combo box in the next row, it changes the value of the pen, blue entry. Does that make sense??

I'm very knew to this so I apolgize for anything that is unclear.

Any help, suggestions, or resources??
 
Last edited:

Users who are viewing this thread

Back
Top Bottom