Type Mismatch

J

Jahlu

This one should be pretty simple. I am trying to set up a condition in my
macro which will open a message box if a field on my form is null or does not
pull up any information. For my condition, I have tried...

[field] is null

and...

[field] = ""

The first condition did nothing regardless of whether the field was
populated or not. The second condition I tried did nothing when the field was
populated but gave me a "Type Mismatch" error message when the field was not
populated. Any assistance would be greatly appreciated!
 
S

Steve Schapel

Jahlu,

The 'Type Mismatch' error would lead me to believe that the field is not
a Text data type. But in any case, I would assume that it is very
unlikely that the value of the field would be "" (zero-length string).

If the field has no data in it, I would expect:
[field] Is Null
.... to work. So if it doesn't, can you let us know a bit more
information, for example:
1. What is the data type of the [field]?
2. What type of control is the field represented by on the form?
3. Which Event are you assigning the macro to?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top