test field to see if blank

jojo

Registered User.
Local time
Yesterday, 22:43
Joined
Jul 20, 2012
Messages
51
I am working on a macro that should check to see if a field is blank, then close that form without saving the rec, and open another form. The field is text. The if statement has the full reference of forms!form name! etc, but i typed if [field] <>" ", and i'm getting a data mismatch error message on that. The macro creator is rigid. In code I would say If isnull([field name]). but the macro doesnt accecpt that either. How can I code this. Thank you so much!
Access 2010
 
With macro criteria the IF is taken for granted. Just use IsNull(Forms!FormName.Field)
Or you could use NZ(Forms!FormName.Field,0)=0
 
thank you very much toIsskint!! For your quick reply AND for your right on target answer!! Ofcourse...when I used isnul( ) and got the errormsg it was because I didn't have the full forms!formname.identifier. I corrected that, but htought the problem was with isnull
Tahnk you so much!
Jojo
 

Users who are viewing this thread

Back
Top Bottom