I have a command button that opens a form to specific.
I want to create a "No policy found" message but can't work out how to do it.
I tried this on the OnOpen of my form.
Could anybody point me i the right direction please ?
I want to create a "No policy found" message but can't work out how to do it.
I tried this on the OnOpen of my form.
Could anybody point me i the right direction please ?
Code:
Private Sub Form_Open(Cancel As Integer)
If Not IsNull(Policy_reference) Then
Exit Sub
Else
DoCmd.Close acForm, "frm_tranche_single_formPS"
MsgBox "Policy Not Found"
End If
End Sub