Hi All,
I have a form that will sometime contain no records for different users and I want a mesage to appear when there are no records waiting for them.
I have code in place to close the form when they run out of records to approve, so I copied that code thinking it would work on the form load if there were no records available, but nothing is different it just loads the blank form.
Here is the code i'm using:
Private Sub Form_Open(Cancel As Integer)
If Form.RecordsetClone.RecordCount > 0 Then
MsgBox "There are no requests awaiting your approval"
DoCmd.Close
End If
End Sub
Any ideas anyone??
Cheers,
Ryan
I have a form that will sometime contain no records for different users and I want a mesage to appear when there are no records waiting for them.
I have code in place to close the form when they run out of records to approve, so I copied that code thinking it would work on the form load if there were no records available, but nothing is different it just loads the blank form.
Here is the code i'm using:
Private Sub Form_Open(Cancel As Integer)
If Form.RecordsetClone.RecordCount > 0 Then
MsgBox "There are no requests awaiting your approval"
DoCmd.Close
End If
End Sub
Any ideas anyone??
Cheers,
Ryan