Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Q re returning calculated values to a table

Status
Not open for further replies.

PaulTav

Technical User
Jul 21, 2002
1
GB
Hi All

Please forgive what I'm sure is a dumb question but I've spent half a very frustrating day on this.... (got to learn Access sometime!)

Access 2000
XP pro


I have three tables: books, borrowers and loans. Each has an ID field as the key.

I have a form for issuing books to borrowers which updates the tables with which borrower has got what book. All OK so far.

My problem.... In the form I have a calculated field which uses the "DateAdd" function to calculate the return date for the book from the loan date field plus 14 days. Whilst the loans table will update fine with the loan date, it will not update with the calculated return date:~#

Any ideas?

Thanks

Paul
 
Here's the perennial diatribe:

Usually there isn't a good reason to store calculated fields unless the particular value is of historical value. You can always produce this info on the fly via queries or calculated boxes in forms--this way if your business rules change you don't have bad data (e.g. the loan period changes to 10 days).

*DateAdd isn't even necessary here--Access will add days if you calculate thus: DateDue: [LoanDate] + 14

If you put a bit more detail out there it will be easier to answer your question. Do you have a text box with controlsource set to the DateDue field? How are you doing the calculation for the value? Jeff Roberts
Analysis, Design, & Implementation
RenaissanceData.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top