If IsNull(Me.MyField) Then
' MyField is empty
End If
or (my preference)
If Len(Me.MyField & vbNullString) = 0 Then
' MyField is empty
End If
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"Chrisso" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All
>
> How can I determine if a user has entered a value in a field on a form?
>
> I have a field which is just a text box which sits on a field in a
> table. I want my VB code to check whether anything has been entered by
> the user as an interim check - I do more secure checking with the field
> details in the table of course.
>
> I have tried:
> Me.MyField = ""
> Me.MyField Is Nothing
> Me.MyField Is Null
> Me.MyField = Nul
> and even tried Len on Me.MyField - all to no avail.
>
> This should be easy - what am I missing? Thanks for any and all help.
>
> Chrisso
>