Subform calculation (1 Viewer)

dkirk02

Registered User.
Local time
Today, 11:06
Joined
Jan 26, 2001
Messages
38
I am stumped on this one!
Situation:
Main form [Case Info] has subform [Acct Info]
In [Acct Info] I need to calculate cycle time and have it write to the table.

formula =[Date Stopped]-[Date Acct Est]
I have created a macro on the subform that is used as an after update event for the Date Stopped field using the above formula.
The procedure works on the subform itself...it even writes to the table. However, when I go into the main that uses Acct Info as the subform, when trying to perform the procedure an error comes back stating that MS can't find the form Acct Info. Can anyone help?
 
R

Rich

Guest
You shouldn't store calculated values in a table use a query to retrieve cycle time.
 

dkirk02

Registered User.
Local time
Today, 11:06
Joined
Jan 26, 2001
Messages
38
The end users who enter the info into the form need to be able to view the cycle time. And the cycle time will also need to be retrieved to use in reports, sometimes a month down the road. What harm will be caused by storing a calculated value in the table? I can only find documentation that states that it is not advisable, but nothing telling what will happen.
Having said all that, if you know of a way to perform my original task, could you let me know?
 

KevinM

Registered User.
Local time
Today, 11:06
Joined
Jun 15, 2000
Messages
719
dirk, take Rich's advice...DO NOT store calculated fields in a table, let the query do that for you. You can always base your forms and reports on the query and display the calculations there.
 

Users who are viewing this thread

Top Bottom