Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / July 2007

Tip: Looking for answers? Try searching our database.

Calculation in Access 2003

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave - 28 Jul 2007 18:08 GMT
I have 3 fields in a table:
Length of Tie In
Completed Date
Review Date

I want the Review Date to be the same as I have created in Form view =[Date
Of Completion]+[Length of Tie In1]*365-90

Does anyone know how I can do this in a Table please?
Steve - 28 Jul 2007 19:14 GMT
Create a query based on your table. With the query in desugn view, click on
the Type Of Query button in the menu at the top of the screen and chabge the
query to an Update query. Under the Review Date field, type the following
expression in Update To:
[Completed Date] + [Length Of Tie In] * 365 - 90

Question --
Do you want to subtract 90 from 365 before multiplying or after? If before,
you need (365-90).

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications
resource@pcdatasheet.com

>I have 3 fields in a table:
> Length of Tie In
[quoted text clipped - 6 lines]
>
> Does anyone know how I can do this in a Table please?
Spurious Response - 29 Jul 2007 10:53 GMT
>Create a query based on your table. With the query in desugn view, click on
>the Type Of Query button in the menu at the top of the screen and chabge the
[quoted text clipped - 5 lines]
>Do you want to subtract 90 from 365 before multiplying or after? If before,
>you need (365-90).

 Oh boy!  The question remains... just how long will this change of
stripes last?

 Snipped retarded continued used of ad.
Dave - 29 Jul 2007 18:06 GMT
Steve,
This has also worked fine.
In answer to your question, i wanted the formula exactly how it was.
Once again, many thanx for your help

> Create a query based on your table. With the query in desugn view, click on
> the Type Of Query button in the menu at the top of the screen and chabge the
[quoted text clipped - 21 lines]
> >
> > Does anyone know how I can do this in a Table please?
John W. Vinson - 29 Jul 2007 20:31 GMT
>Steve,
>This has also worked fine.
[quoted text clipped - 6 lines]
>> expression in Update To:
>> [Completed Date] + [Length Of Tie In] * 365 - 90

Just one concern - you want to IGNORE leap years, so that the field will slip
to one calendar day earlier for every four years in the Length Of Tie In?

If you want to add that many years and then subtract 90 days from the result,
consider using the DateAdd function:

DateAdd("yyyy", [Length Of Tie In], [Completed Date]) - 90

This will add (say) 10 years to the value in Completed Date, giving the same
calendar date ten years hence regardless of leap years, and then subtract 90
days from that result.

            John W. Vinson [MVP]
John Spencer - 29 Jul 2007 23:22 GMT
That makes the assumption that Length of Tie In is an INTEGER field.  I
was about to post the same advice until I realized that Length of Tie In
could be something like 2.5

'====================================================
 John Spencer
 Access MVP 2002-2005, 2007
 Center for Health Program Development and Management
 University of Maryland Baltimore County
'====================================================

>> Steve,
>> This has also worked fine.
[quoted text clipped - 20 lines]
>
>              John W. Vinson [MVP]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.