I have a form with 2 combos, 6 txt boxes and 1 cmd button.
When a user click the cmd button, the 6 txt boxes should show data from a table, which corresponds to what is entered/chosen in both combos. If a combination in the 2 combos is not available, a msgbox should pop up stating same, and if a user only use one combo, a msgbox should also state that both combos should be used.
So far I'm only able to show data in the txt boxes based on 1 combo (see code below). I would appreciate any help you might have.
-----------------------
Private Sub cmdServiceFind_Click()
Forms!frmservice.txtMax20cap = DLookup("Max20Capacity", "tblServiceRestriction", "Service='" & Forms!frmservice.cboServiceCombo.Column(0) & "'")
'(Above line is made for each textbox)
End sub
When a user click the cmd button, the 6 txt boxes should show data from a table, which corresponds to what is entered/chosen in both combos. If a combination in the 2 combos is not available, a msgbox should pop up stating same, and if a user only use one combo, a msgbox should also state that both combos should be used.
So far I'm only able to show data in the txt boxes based on 1 combo (see code below). I would appreciate any help you might have.
-----------------------
Private Sub cmdServiceFind_Click()
Forms!frmservice.txtMax20cap = DLookup("Max20Capacity", "tblServiceRestriction", "Service='" & Forms!frmservice.cboServiceCombo.Column(0) & "'")
'(Above line is made for each textbox)
End sub