I
Ian
I'm trying to create an IfThenElse statement for an OnClose command of a form;
The query outputs a count of a field
If the count is =0 I want the vbYESNO msgbox to show.
I assume I need to DIM the results of the query somehow but I don't know how.
If [CountofApptID] = 0 Then
If MsgBox ("Change Recall", vbYESNO) = vbYES Then
........
Else
DoCmd.CloseForm
End If
Else
DoCmd.CloseForm
End If
The query outputs a count of a field
If the count is =0 I want the vbYESNO msgbox to show.
I assume I need to DIM the results of the query somehow but I don't know how.
If [CountofApptID] = 0 Then
If MsgBox ("Change Recall", vbYESNO) = vbYES Then
........
Else
DoCmd.CloseForm
End If
Else
DoCmd.CloseForm
End If