Dependent Combo Boxes

E

Esrei

What am I doning wrong I followed the articel on blueclaw.com regarding
dependent compo boxes in a form done the quiries and agter update code. but
as soon as I click on the drop down arrow of the 2nd combo box it asks me for
a parameter value.

This is the querie for my 2nd combo (combp12) box
SELECT Ingredients.Ingredient_Description, Ingredients.[Ingredient
Catagory], Ingredients.Ingredient_Subcatagorie FROM Ingredients WHERE
(((Ingredients.[Ingredient Catagory])=Forms![Rec_Ing Subform]!Combo10));

This is the after update event in The first combo (combo10) box:

Private Sub Combo10_AfterUpdate()
Me!Combo12.Requery
End Sub

Thank You
 
O

Ofer Cohen

Assuming by the name of the form that it's a SubForm, if that case then the
path should be different

Forms![MainFormName]![SubFormControlName].Form![Combo10]


If that is not the case check the name again if they are spelled correctly
 
E

Esrei

Thank you so mutch, why is there a expresion builder it it does not work
correctly.

Thanks again

Ofer Cohen said:
Assuming by the name of the form that it's a SubForm, if that case then the
path should be different

Forms![MainFormName]![SubFormControlName].Form![Combo10]


If that is not the case check the name again if they are spelled correctly

--
Good Luck
BS"D


Esrei said:
What am I doning wrong I followed the articel on blueclaw.com regarding
dependent compo boxes in a form done the quiries and agter update code. but
as soon as I click on the drop down arrow of the 2nd combo box it asks me for
a parameter value.

This is the querie for my 2nd combo (combp12) box
SELECT Ingredients.Ingredient_Description, Ingredients.[Ingredient
Catagory], Ingredients.Ingredient_Subcatagorie FROM Ingredients WHERE
(((Ingredients.[Ingredient Catagory])=Forms![Rec_Ing Subform]!Combo10));

This is the after update event in The first combo (combo10) box:

Private Sub Combo10_AfterUpdate()
Me!Combo12.Requery
End Sub

Thank You
 
O

Ofer Cohen

In the expresion builder you need to select the main form name, then it will
list the sub form control name, after selecting the sub form you'll get the
fields within the sub form

If you select the sub form first, then it will assume that you want to use
it as a single form and not as a sub form

--
Good Luck
BS"D


Esrei said:
Thank you so mutch, why is there a expresion builder it it does not work
correctly.

Thanks again

Ofer Cohen said:
Assuming by the name of the form that it's a SubForm, if that case then the
path should be different

Forms![MainFormName]![SubFormControlName].Form![Combo10]


If that is not the case check the name again if they are spelled correctly

--
Good Luck
BS"D


Esrei said:
What am I doning wrong I followed the articel on blueclaw.com regarding
dependent compo boxes in a form done the quiries and agter update code. but
as soon as I click on the drop down arrow of the 2nd combo box it asks me for
a parameter value.

This is the querie for my 2nd combo (combp12) box
SELECT Ingredients.Ingredient_Description, Ingredients.[Ingredient
Catagory], Ingredients.Ingredient_Subcatagorie FROM Ingredients WHERE
(((Ingredients.[Ingredient Catagory])=Forms![Rec_Ing Subform]!Combo10));

This is the after update event in The first combo (combo10) box:

Private Sub Combo10_AfterUpdate()
Me!Combo12.Requery
End Sub

Thank You
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top