Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to determine if a "date" field is null 1

Status
Not open for further replies.

john765

Programmer
Dec 23, 2004
5
GB
I'm new at this game and cannot find any hints on this. Please can someone tell me how to determine if a date field is empty (null) before I update another field.

Thanks in advance.
 
It depends

do you have the field accessible in a recordset
or is there a control on a form that is bound to this field ?


If, as I suspect, you have a text box control on a form that is bound to the field you want to test then you just check the contents of the control.


Code:
If IsNull(textboxname) Then
    ' Do the IsNull action
Else
    ' Do the not Null action
End If

Where you put the above code depends on when you want to do the check - when event has given rise to you needing to do the check.



'ope-that'elps.



G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top