By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,145 Members | 1,443 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,145 IT Pros & Developers. It's quick & easy.

Testing for Null Values

P: 44
I have a form where the user enters various fields of information. Some of these fields may be left blank until a point in time when the user is ready to issue a permit. At that time they will click a button that unleashes a sequence of events that ultimately results in the aforemntioned permit being issued. The first events is a data checking routine, to make sure that all the values are appropriate for this action. I'm able to test most things quite easily. However when a field is null and I use the following syntax:

If Me![OwnerNo] Is Null Then
MsgBox "You must enter a valid Sign Owner before issueing a permit."
Exit Sub
End If

It reurns the message "Object Required", while the following command works fine:
If Me![NewStatus] = "I" Then
MsgBox "You must change the status to something other than 'Illegal' before issueing a permit."
Exit Sub
End If

What gives?

Also, Is it not possible to assign background colors to tab pages?

Thanks!
Dec 17 '07 #1
Share this Question
Share on Google+
3 Replies


missinglinq
Expert 2.5K+
P: 3,532
The proper syntax in VBA is

If IsNull(Me.OwnerNo) Then

Linq ;0)>
Dec 17 '07 #2

P: 44
That's what I needed. Thanks
Dec 17 '07 #3

missinglinq
Expert 2.5K+
P: 3,532
Glad we could help! BTW, the inverse syntax in VBA would be:

If Not IsNull(YourFieldName) Then

Linq ;0)>
Dec 17 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.