Calculating Dates:

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

Hi all, I have this issue with calculating dates..

In the Open Form event I want to create a message:
If the value between Today () and the date in the control [Expire] equals or
is less than 90 days?

Thanks!
 
If datediff("d",date(),[Expire]) <=90 then
Msgbox "Due to expire message . . "
End If
 
Thanks a lot Ronaldo!

RonaldoOneNil said:
If datediff("d",date(),[Expire]) <=90 then
Msgbox "Due to expire message . . "
End If

Peter said:
Hi all, I have this issue with calculating dates..

In the Open Form event I want to create a message:
If the value between Today () and the date in the control [Expire] equals or
is less than 90 days?

Thanks!
 
... i tried this in Access 2007..but..seems the date() does not function

If datediff("d",date(),[Expire]) <=90 then,,,

???

RonaldoOneNil said:
If datediff("d",date(),[Expire]) <=90 then
Msgbox "Due to expire message . . "
End If

Peter said:
Hi all, I have this issue with calculating dates..

In the Open Form event I want to create a message:
If the value between Today () and the date in the control [Expire] equals or
is less than 90 days?

Thanks!
 
.. i tried this in Access 2007..but..seems the date() does not
function

If datediff("d",date(),[Expire]) <=90 then,,,

???

The Form_Open event is too early in the process for the code to work,
try moving it to the Form_Current event.

You may also have a references issue with the date() function, Google
for that, and/or try the now() function which is date() plus time()

Q
RonaldoOneNil said:
If datediff("d",date(),[Expire]) <=90 then
Msgbox "Due to expire message . . "
End If

Peter said:
Hi all, I have this issue with calculating dates..

In the Open Form event I want to create a message:
If the value between Today () and the date in the control
[Expire] equals or is less than 90 days?

Thanks!
 
Thanks Bob..will try that one..

Bob Quintal said:
.. i tried this in Access 2007..but..seems the date() does not
function

If datediff("d",date(),[Expire]) <=90 then,,,

???

The Form_Open event is too early in the process for the code to work,
try moving it to the Form_Current event.

You may also have a references issue with the date() function, Google
for that, and/or try the now() function which is date() plus time()

Q
RonaldoOneNil said:
If datediff("d",date(),[Expire]) <=90 then
Msgbox "Due to expire message . . "
End If

:

Hi all, I have this issue with calculating dates..

In the Open Form event I want to create a message:
If the value between Today () and the date in the control
[Expire] equals or is less than 90 days?

Thanks!



--
Bob Quintal

PA is y I've altered my email address.
.
 
Back
Top