Hi
I have a form which contains 2 combo boxes
one reveals a drop down list of parishes
the other reveals a list of the churches in that parish
The form contains a button whicvh creates two temporary variable and then opens a form.
Code:
Private Sub btnSearch_Click()
TempVars.Add "varParish", Me.cboParish.Column(1)
TempVars.Add "varChurch", Me.cboChurch.Column(1)
DoCmd.Close
DoCmd.OpenForm FormName:="frm_HomeFiltered"
End Sub
I need to add criteria so that if the user fails to select either a parish or a church frm_HomeFiltered does not open and a message box pops up to tell them to select a Parish and a CHurch.
I've tried adding criteria so that if the combo box is Null show a message and I failed at that.
I then thought of using the existence of a temporary variable as criteria?
I seem to be digging a big hole, is there a simpler way?
thanks
Ian