Using the FAQ provided by RickSpr I was able to limit the selection contents of a combo box based on what is previously selected in another combo box. It works just great when I test it on its own form. However, once I copy the form onto another (making it a subform) the second combo box no longer works properly. Instead, I receive the following error message:
Enter Parameter Value
Forms!sfrmRequestDetails.cboCategory
Here are the form and field names:
Main form = frmCustomerRequests
Sub form = sfrmRequestDetails
Combo box 1 = cboCategory (on subform)
Combo box 2 = cboProduct (on subform)
(Categoy selection in cbo#1 dictates which products can be chosen in cbo#2.)
Current select stmt of Combo box 2 =
SELECT [tblProducts].[ProductName] FROM tblProducts WHERE ((([tblProducts].[CategoryName])=[forms]![sfrmRequestDetails].[cboCategory]));
Can someone explain why this works fine until I place the subform on a primary form?
Thank you,
KerryL
Enter Parameter Value
Forms!sfrmRequestDetails.cboCategory
Here are the form and field names:
Main form = frmCustomerRequests
Sub form = sfrmRequestDetails
Combo box 1 = cboCategory (on subform)
Combo box 2 = cboProduct (on subform)
(Categoy selection in cbo#1 dictates which products can be chosen in cbo#2.)
Current select stmt of Combo box 2 =
SELECT [tblProducts].[ProductName] FROM tblProducts WHERE ((([tblProducts].[CategoryName])=[forms]![sfrmRequestDetails].[cboCategory]));
Can someone explain why this works fine until I place the subform on a primary form?
Thank you,
KerryL