contents of 2nd cbo box based off of 1st combo, subform

vega

Registered User.
Local time
Today, 08:22
Joined
Aug 1, 2012
Messages
24
Greetings all,

So the common, limit the contents of combo boxes based off selection in other combo box dilemma. I know about the baldy web resource (Forms: Limit content of combo/list boxes) and have been trying to implement the (second) solution for what seems like weeks now but im not getting this.
I need selection of combo box in form to limit the contents of combo box 2 in sub form of the sheet. I have tried to use the second option of the above article, no dice, I get the error "expression After Update you entered as the event property...produced the following error" a problem while Microsoft Access was communicating with the OLE server or Active X"

need: selection of ranch number (dimRanches) in cbo1 will limit the variety type (associated via a another table, dimRanchVarieties) in cbo box 2

combo box 1 After Update Event (form):
Private Sub cboRanch_AfterUpdate()
Me!cboVar.Form.Requery (<-also tried path to sub form, doesnt work)
End Sub

combo box 2 SQL stored query (subForm):
SELECT dimRanchVarieties.variety, dimRanchVarieties.plantMo, dimRanchVarieties.acres, dimRanchVarieties.block, dimRanchVarieties.currCycle, dimRanchVarieties.ranchVarID
FROM dimRanchVarieties
WHERE (((dimRanchVarieties.ranchID)=[Forms]![frm_piscandoMainForm]![cboRanch]));




Working in Access 13, but same outsome in native production enviornment of Access 10 and 07. Any help very much appreciates, thank you community.
 
:banghead:
Im completley lost here and have been problem solving this since the last post.

Im not sure what the gotFocus event is or how I would use it. I have no idea what types of events I need in the first combo box (parent), or how I am supposed to durect them. I see examples of AfterUpdate, Current (which ive not heard of) but not sure if I need to use both.

Also on the child combo box 2, I have the rowsource string correct but also not sure what event type I need.

After tweaking I also cant get past this:
 

Attachments

  • qry1.JPG
    qry1.JPG
    33.1 KB · Views: 130
Last edited:

Users who are viewing this thread

Back
Top Bottom