Calculating Dates:

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!
 
R

RonaldoOneNil

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

Peter

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!
 
P

Peter

... 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!
 
B

Bob Quintal

.. 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!
 
P

Peter

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.
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top