G
Guest
I have two combo boxes, WorkType and WorkNat in a subform where WorkNat
contents are dependent on WorkType. The following code works fine when I load
and test the subform on its own, but when I load the form in which the
subform is embedded I get a message "Enter Parameter Value" for Forms!Cases
Subform!WorkType, both when I load the form and when I select a new value for
the WorkType combo box. Also the WorkNat combo box dropdown list is blank.
Why is this happening?
Private Sub WorkNat_AfterUpdate()
Dim strSQL As String
strSQL = "Select WorkNature"
strSQL = strSQL & " from [Work Nature] Where WorkTRef = [Forms]![Cases
Subform]![WorkType];"
End Sub
Private Sub WorkType_AfterUpdate()
Me!WorkNat.Requery
End Sub
contents are dependent on WorkType. The following code works fine when I load
and test the subform on its own, but when I load the form in which the
subform is embedded I get a message "Enter Parameter Value" for Forms!Cases
Subform!WorkType, both when I load the form and when I select a new value for
the WorkType combo box. Also the WorkNat combo box dropdown list is blank.
Why is this happening?
Private Sub WorkNat_AfterUpdate()
Dim strSQL As String
strSQL = "Select WorkNature"
strSQL = strSQL & " from [Work Nature] Where WorkTRef = [Forms]![Cases
Subform]![WorkType];"
End Sub
Private Sub WorkType_AfterUpdate()
Me!WorkNat.Requery
End Sub