Basing one combo box on another - doesn't work in subform

china99boy

Registered User.
Local time
Today, 16:43
Joined
Apr 27, 2006
Messages
161
hello... I have a form with 2 combo box. The second combo box items are limited based on the selection in the first. Everything works great on the form, except when I embed this form on another. As soon as I make a choice in the first combo box, and then try to select something in the second box I get a pop up box called "Enter Parameter Value" shows up with "Forms!frmTracking.cmbTracking.Value"

The form that I have it embed to is called frmMain. Below is the sql for the query. Can you guys guide me to what I am missing? Thanks in advance.

Code:
SELECT DISTINCT tblMtgType.mtgType, tblMtgType.ltv, tblMtgType.ltvDescription
FROM tblMtgType
WHERE tblMtgType.mtgType =[forms]![frmTracking].[cmbTracking].[value];
 
since your form is now a subform you include the main form name in the criteria:

WHERE tblMtgType.mtgType =[forms]![frmMain]![frmTracking].Form![cmbTracking].[value];
 
Thank you so much for your reply. I tried that before and just did it again but go similar error.

Forms!frmMain!frmTracking.Form!cmbTracking.Value
 
remove the .Value from your query.
 
After making the recommended changes, my query now looks like this and still get the same error.

Code:
SELECT DISTINCT tblMtgType.mtgType, tblMtgType.ltv, tblMtgType.ltvDescription
FROM tblMtgType
WHERE tblMtgType.mtgType =[forms]![frmMain]![frmTracking].Form![cmbType];
 
we have combo cmbTracking before not cmbType
 
That was just a typo. But it is correct and still producing the same results. Sorry for the confusion
 
i re-created you scenario, but im producing the correct result.
is it a Navigation form that you added to?
 
I was able to create a new dummy dba and tried it out and it works great with what you provided. But it doesn't work on my existing forms. Not sure what you mean by a "Navigation form"
 
if it is not too much can you post your db, so anyone can look and a a fix on it.
 
Hi....I was able to find out what my problem. I was using the name of the form but, the expression was looking for "ENTRY FORM" which I had as the caption for the form. But I still couldn't do it without your help "arnelgp" Thanks for your time.
 

Users who are viewing this thread

Back
Top Bottom