elizabethcke
New member
- Local time
- Today, 00:45
- Joined
- Dec 12, 2012
- Messages
- 7
Hello,
I remember having this problem before but can't remember how to fix it. I have an orders form that has two combo boxes which are both filtered based on what is selected in another combo box. The subform works fine alone but once I add it to my main form as a control, I get requests for parameters. I've named the subform the same, frmOrders, but still no luck. I tried setting the focus to the subform and nothing. The combo boxes that are filtered are cboSize and cboColor based off the selection in cboItem.
In the filtered combo boxes query for criteria under Item# I have [Forms]![frmOrders]![cboItem].
I have the following code in the cboItem's After Update
Private Sub cboItem_AfterUpdate()
Me.cboSize = Null
Me.cboSize.Requery
Me.cboSize = Me.cboSize.ItemData(0)
Me.cboColor = Null
Me.cboColor.Requery
Me.cboColor = Me.cboColor.ItemData(0)
End Sub
I realize the subform is acting as a control in the main form but I have no idea how to fix it.
Can anyone tell me what I am doing wrong. I've attached the database so you can check it out. Any help is appreciated. Thank you! :banghead:
I remember having this problem before but can't remember how to fix it. I have an orders form that has two combo boxes which are both filtered based on what is selected in another combo box. The subform works fine alone but once I add it to my main form as a control, I get requests for parameters. I've named the subform the same, frmOrders, but still no luck. I tried setting the focus to the subform and nothing. The combo boxes that are filtered are cboSize and cboColor based off the selection in cboItem.
In the filtered combo boxes query for criteria under Item# I have [Forms]![frmOrders]![cboItem].
I have the following code in the cboItem's After Update
Private Sub cboItem_AfterUpdate()
Me.cboSize = Null
Me.cboSize.Requery
Me.cboSize = Me.cboSize.ItemData(0)
Me.cboColor = Null
Me.cboColor.Requery
Me.cboColor = Me.cboColor.ItemData(0)
End Sub
I realize the subform is acting as a control in the main form but I have no idea how to fix it.
Can anyone tell me what I am doing wrong. I've attached the database so you can check it out. Any help is appreciated. Thank you! :banghead: