Type Mismatch

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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!
 
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?
 
Back
Top