By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,982 Members | 1,877 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,982 IT Pros & Developers. It's quick & easy.

Form not updating table

P: 2
Here is my problem, basically I have created a database to track how long it takes our office to do certain events. I couldn't get my table to do calculations (=[date1]-[date2]), I don't know if I was doing it wrong, or if access does not allow that, but I did figure out how to do it in the forms. However I can't get the Form to put those calculations into the corresponding table. It updates everything else on the table, except for the things that I have the expressions in. If anyone has any ideas on how to help me, I would greatly appreciate it.

Thanks Again!!!
Oct 26 '06 #1
Share this Question
Share on Google+
4 Replies


PEB
Expert 100+
P: 1,418
PEB
Hi

How do you want your result?

In days, months years?

I've participated in a post about the difference btwn 2 dates..

See in the search DatePart()

Format()

DateDiff()

:)
Oct 27 '06 #2

NeoPa
Expert Mod 15k+
P: 31,347
If an object on a form is tied to a field of the underlying dataset AND that recordset is updatable (which a table is of course) then updating the form will pass through to the dataset behind it.
Unfortunately a calculated value is, by definition, not tied to a field in the dataset, so will not update anything.

If you tie a field on your form to a field in the table that can store the result, then you can put some code in the OnCurrent event to update the form. This should, in turn, update your record for you, but only for records that ever become the current one.

Alternatively, you could write a one-off update query.

These are only suggestions as I don't know enough detail of what you're trying to do, but they should be enough to start you off on a track that's right for you.
Oct 27 '06 #3

P: 2
Thank you very much for the help, I am so new to access I didn't know about update querys, so you gave me just the right information for me to go to the help menu and figure it out.

Thanks Again!


If an object on a form is tied to a field of the underlying dataset AND that recordset is updatable (which a table is of course) then updating the form will pass through to the dataset behind it.
Unfortunately a calculated value is, by definition, not tied to a field in the dataset, so will not update anything.

If you tie a field on your form to a field in the table that can store the result, then you can put some code in the OnCurrent event to update the form. This should, in turn, update your record for you, but only for records that ever become the current one.

Alternatively, you could write a one-off update query.

These are only suggestions as I don't know enough detail of what you're trying to do, but they should be enough to start you off on a track that's right for you.
Oct 31 '06 #4

NeoPa
Expert Mod 15k+
P: 31,347
Thank you very much for the help, I am so new to access I didn't know about update querys, so you gave me just the right information for me to go to the help menu and figure it out.

Thanks Again!
It's quite pleasing to be of help.
It's even better when it's clear that the 'helpee' is also working on the problem and putting some effort in.
You getting up-and-running, and able to continue under your own steam is best.
Oct 31 '06 #5

Post your reply

Sign in to post your reply or Sign up for a free account.