if date field is not null

krberube

just beyond new
Local time
Today, 10:08
Joined
Jan 14, 2005
Messages
142
good morning all,
I am using the afterupdate event on this forms field. If this date field is NOT EMPTY, then i want the next field to be visible. Here is the code i have

If Me.quotedate = ????????? Then
Me.quotehow.Visible = True
Else
Me.quotehow.Visible = False
End If

I have done this with text fields where i have a defined data to be = to, but for a date field what do i put in ?????????? to show is not null?

Thanks
Kevin
 
If Not IsNull([quotedate]) Then
Me.quotehow.Visible = True
Else
Me.quotehow.Visible = False
End If

hth,
Michael
 
sorry take out the not.

If IsNull([quotedate]) Then
Me.quotehow.Visible = True
Else
Me.quotehow.Visible = False
End If


Brian thought I was faster than you.

Michael
 
Hi I've managed to get round this in the past by doing the following

DIM varMyDate as Variant

varMyDate = MyDate.value

If varMyDate <> Null Or varMyDate <> Empty Then

do something

Else

do something different

End If

Hope this helps :cool:
 
Thanks for the fast reply all!
Using the isnull BEFORE the field did the trick. Just started using access with some VB and its amazing how much better your database can be!

This forum has been a great help.
Thanks again
 

Users who are viewing this thread

Back
Top Bottom