Connecting Tech Pros Worldwide Help | Site Map

Calculating Dates

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 12th, 2005, 05:17 PM
Richard Oliver
Guest
 
Posts: n/a
Default Calculating Dates

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




  #2  
Old November 12th, 2005, 05:17 PM
Jim Allensworth
Guest
 
Posts: n/a
Default 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



  #3  
Old November 12th, 2005, 05:17 PM
MacDermott
Guest
 
Posts: n/a
Default 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]


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.