I might be on the wrong track completely
I want to search a subform, of course the search only looks at the current form not all the records ever entered .
Soooo I have in the subform a search btn
Private Sub btnSearch_Click()
DoCmd.Close acForm, "frmMainDel", acSaveYes
DoCmd.OpenForm "frmSubDel", acNormal
End Sub
closes the form (and Sub) and opens the sub on its own with all the records
search works, I then have an exit btn under the search btn which is now visible False
Private Sub btnClose_Click()
DoCmd.Close acForm, "frmSubDel", acNormal
DoCmd.OpenForm "frmMainDel", acNormal
End Sub
which takes me back to the Main Form
The problem my first control in my sub is
Private Sub DateSub_LostFocus()
If Me.DateSub = "" Or IsNull(Me.DateSub) Then
MsgBox "Mandatory Field. A Delivery Date is Required.
Exit Sub
End If
End Sub
Of course when the Main Form is on a New Record this MsgBox pops up
How can I stop this or is there a better way?
Thanks