Checking Values On a Form

Myriad_Rocker

Questioning Reality
Local time
Today, 05:48
Joined
Mar 26, 2004
Messages
166
Let's say you have two text boxes...dates are entered in these. I want to display a message box whenever the difference between the two dates is less than 60 days. When I try to use coding, it says I can't reference a property unless it has focus. I'm used to VB where I can do this...

So...how do I do it in Access?
 
Easiest would be something like
if datediff("d",Me.Date1,Me.Date2) < 60 Then
Display Message
Else
End If

But Date1 has to be less than Date2 (before) or (I Think) a negative will be returned.
 

Users who are viewing this thread

Back
Top Bottom