stillnew2vb
Registered User.
- Local time
- Today, 21:28
- Joined
- Sep 20, 2010
- Messages
- 34
Greetings gurus,
Could you help please?
I have a form which loads on Access startup. If a record exists in the form then an action is performed but how do you define an action if there are no records?
The code I have got is
When there are no records in the form I get an error message run time error 2427 You entered an expression that has no value coming from If Me.UserName... I understand why it is happening but what is the method of getting the code to run if there are no records?
Thank you for your time
Could you help please?
I have a form which loads on Access startup. If a record exists in the form then an action is performed but how do you define an action if there are no records?
The code I have got is
Code:
If Me.UserName <> "" Then
DoCmd.Maximize
MsgBox "New Support Request" & Chr$(13) & Chr$(13) & "Double-click the username to view", vbOKOnly
ElseIf Not exist Then
DoCmd.Minimize
MsgBox "no requests", vbOKOnly
End If
Thank you for your time