Adding days to a date.

R

Robert Smith

I'm trying to learn Access on my own...
I'm wanting to make a simple database to control a calibration schedual.
I have a table called Device with a tab called Freq.
I have another table called Record which contains tabs named InspDate and
DueDate.
Is there a way when I add a date in InspDate something would look at the
Freq tab in Device Table and add the number to InspDate and automatically
update DueDate?

Thanks.
 
J

John W. Vinson

I'm trying to learn Access on my own...
I'm wanting to make a simple database to control a calibration schedual.
I have a table called Device with a tab called Freq.
I have another table called Record which contains tabs named InspDate and
DueDate.
Is there a way when I add a date in InspDate something would look at the
Freq tab in Device Table and add the number to InspDate and automatically
update DueDate?

Thanks.

I'd suggest not storing the DueDate at all, unless you want to be able to
calculate it and then manually override the calculation.

You can create a query with a calculated field

DateAdd("d", [Freq], [InspDate])

assuming that you mean "fields" rather than "tabs" (a Tab in Access jargon is
a page on a Tab Control on a form).
 
A

Arvin Meyer [MVP]

Robert Smith said:
I'm trying to learn Access on my own...
I'm wanting to make a simple database to control a calibration schedual.
I have a table called Device with a tab called Freq.
I have another table called Record which contains tabs named InspDate and
DueDate.
Is there a way when I add a date in InspDate something would look at the
Freq tab in Device Table and add the number to InspDate and automatically
update DueDate?

If you are simply adding days, the DateAdd function. It gets much more
complicated if you want to exclude holidays and weekends. For that, you need
a function such as this:

http://www.datastrat.com/Code/GetBusinessDay.txt
 

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