Date Help

Patho

New member
Local time
Today, 14:59
Joined
Jun 29, 2005
Messages
9
Hi All,

I've searched this forum and can't find the help I need.

I am new to writing databases and would like to be able to have a date calculated by using two other fields. I tried edate but it didn't work

basically i have a table called clients, within that table there are fields including date rates agreed, rate period (duration of Rates) and next review due.

I would like rate review due to automatically populate by adding rate period to to rate agreed.

Thanks in anticipation
 
If I'm reading you right, you have a date (say 1/1/05) and a period (say 60 days), and you want to add 60 days (or weeks, or months, or whatever) to the date. If this is the case, you need to use DateAdd.

The syntax is DateAdd(interval, number, date) where interval is the type of intervals you are adding (yyyy for year, q for quarter, d for day, etc.). In this case, you'd use DateAdd("d", 60, #1/1/2005#) to get 3/2/2005.
 
Thanks ejstefl
I used this =DateAdd([d],[Rate Period Months],[Date Rates Signed]) in control source and got name# when I re-opened the form :'(


Regards

Pat
 
Patho said:
Thanks ejstefl
I used this =DateAdd([d],[Rate Period Months],[Date Rates Signed]) in control source and got name# when I re-opened the form :'(


Regards

Pat

Try =DateAdd("m",[Rate Period Months],[Date Rates Signed])

I'm assuming you want to add months to the date, not days. Also, use quotes, and not the square brackets for the interval.
 
You're a diamond, Thanks very much,

I built it using the expression builder so I just left the [] there


Once again thanks


I'm going on an access course in a few weeks


Pat
 

Users who are viewing this thread

Back
Top Bottom