Check for no data entry

bunji

Registered User.
Local time
Today, 17:59
Joined
Apr 26, 2005
Messages
124
I have some fields on a form that are update once a cmbo box is updated. They are updated by dlookups. However the fields that it looks up maybe empty so nothing is entered. So the user can enter the information themselves. On exit i would like to check to see if the field on the form is empty if so to flag up a msg.

i.e.
if me.field = "" then
msgbox "You havent completed this field"
end if

However when i run this it doesnt detect that the field is blank. Is this because the field is being updated with a blank field from the dlookup. I have even tried = null.

I hope this makes sense. Thanks
 
Code:
If IsNull(Me.MyControl) Then
 
cool it worked thanks
 
ok so now its detecting it what i would like to do is setup so that the it highlights the ones that are empty...

Code:
    If IsNull(Me.field1) Then
    MsgBox "You have not fully completed this form"
    Me.field1_Label.ForeColor = 255

But what if i have several fields that i would like to check and when highlighted only change the colours of those that were empty.

For example Field1 or Field 2 or Field3 i want to check.

Field 1 & 2 are empty so therefore i only change their colour
 

Users who are viewing this thread

Back
Top Bottom