Date Function

R

reno.04

Hi

can someone explain which date function i should use if i want the system
date to appear in a textbox as i enter it

Cheers
 
R

Reggie

Reno try the On Enter event or Got Focus event of the text box

Private Sub myTextBox_Enter()
Me.myTextBox = Date
End Sub
 
R

reno.04

hey Reggie

that didnt work

and could you explain (cause help doesnt ,atleast to my understanding)
what the interval, means in the following function

DateAdd («interval», «number», «date»)

What i'm trying to do is write a query that will tell me which clients
certifications are due for renew say after 3 yrs
Cheers
Reno
Ps Thank you for all your help
 
R

Reggie

Interval is the interval of time you want to add for example year, month,
day, minute, etc. and number is the number of intervals so for example
should you use
NewDate = DateAdd( "yyyy", 3, Date()) would give you the date 3 years from
todays date.
NewDate = DateAdd( "m", 3, Date()) would give you the date 3 months from
todays date.

NewDate = DateAdd( "h", 4, Now()) would give you the time 4 hours from now.

Hope this helps
 

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