Connecting Tech Pros Worldwide Help | Site Map

Calculating Dates

Richard Oliver
Guest
 
Posts: n/a
#1: Nov 12 '05
Access 97----Have searched the FAQ sites with no success.
I need a dbase to keep a record of maintenance calls and plan the next
call .
The maintenance periods run in monthly cycles which vary according to
the item.
The maintenance periods are 3,6,9,12,18 and 24 months.
The dbase has a field " Maint. Period Mths." which shows the Maint
Period for that particular item.
I would like to design the dbase with a field "Date" (being the last
call made) and a field "Next Call" (a Date) and be able to do something
like "Date" + " Maint Period Mths" = "Next Call " (Calculated).
I would really appreciate some help as none of my methods seem to work.
Many Thanks ,Richard



Jim Allensworth
Guest
 
Posts: n/a
#2: Nov 12 '05

re: Calculating Dates


On Sat, 27 Dec 2003 15:19:34 +0200, Richard Oliver
<R.Oliver@Spam.co.za> wrote:
[color=blue]
>Access 97----Have searched the FAQ sites with no success.
>I need a dbase to keep a record of maintenance calls and plan the next
>call .
>The maintenance periods run in monthly cycles which vary according to
>the item.
>The maintenance periods are 3,6,9,12,18 and 24 months.
>The dbase has a field " Maint. Period Mths." which shows the Maint
>Period for that particular item.
>I would like to design the dbase with a field "Date" (being the last
>call made) and a field "Next Call" (a Date) and be able to do something
>like "Date" + " Maint Period Mths" = "Next Call " (Calculated).
>I would really appreciate some help as none of my methods seem to work.
>Many Thanks ,Richard
>[/color]

First don't keep a date field for the "Next Call" since that is
calculated. Just keep the Maintenance Period as an integer - then
calculate from that.

Use the DateAdd function to calc the next call:

?DateAdd("m",3,"12/15/03")
3/15/2004

- Jim



MacDermott
Guest
 
Posts: n/a
#3: Nov 12 '05

re: Calculating Dates


In addition to Jim Allensworth's very sound advice -
Keep your maintenance calls in a separate table from the equipment
table.
Use a Totals Query to find the most recent call for any particular piece
of equipment.
Don't store that in the equipment table, or it can get out of sync
with the data in the calls table.

HTH
- Turtle
"Jim Allensworth" <JimNOT@NOTdatacentricsolutions.com> wrote in message
news:3fed9246.833765@netnews.comcast.net...[color=blue]
> On Sat, 27 Dec 2003 15:19:34 +0200, Richard Oliver
> <R.Oliver@Spam.co.za> wrote:
>[color=green]
> >Access 97----Have searched the FAQ sites with no success.
> >I need a dbase to keep a record of maintenance calls and plan the next
> >call .
> >The maintenance periods run in monthly cycles which vary according to
> >the item.
> >The maintenance periods are 3,6,9,12,18 and 24 months.
> >The dbase has a field " Maint. Period Mths." which shows the Maint
> >Period for that particular item.
> >I would like to design the dbase with a field "Date" (being the last
> >call made) and a field "Next Call" (a Date) and be able to do something
> >like "Date" + " Maint Period Mths" = "Next Call " (Calculated).
> >I would really appreciate some help as none of my methods seem to work.
> >Many Thanks ,Richard
> >[/color]
>
> First don't keep a date field for the "Next Call" since that is
> calculated. Just keep the Maintenance Period as an integer - then
> calculate from that.
>
> Use the DateAdd function to calc the next call:
>
> ?DateAdd("m",3,"12/15/03")
> 3/15/2004
>
> - Jim
>
>
>[/color]


Closed Thread


Similar Microsoft Access / VBA bytes