Full Version: Calculated columns showing #error??
UtterAccess Forums > Microsoft® Access > Access Forms
bubu678
I am using Access 2003. I have a form that shows many calculated columms (some using =Dlookup(), other using =ufMyFunctions() stored in Modules). I update only 2 columns and the the form is set up as a ContinuousForm.
o problem, everything displays when I open it. Also in the form is a call (found in Modules) to function that updates a column on that table. Basiclly when opening the form it could do some updates. As I said everything works great when I open the form.
What I have noticed is that when I open the form using the following:
stDocName = "frmIPMVPCosts"
DoCmd.OpenForm stDocName, acNormal
DoCmd.GoToRecord , , acFirst
DoCmd.GoToRecord , , acLast
DoCmd.Close acForm, "frmIPMVPCosts", acSaveYes
all the columns display #ERROR, except the bound columns, which display correctly. The reason I do this method is on a change of value for some of the columns used in the calculated columns on the form, I need to force an update automatically. Instead of waiting on the user to open and close the form, I do it on a CLOSE event in another form that updated some columns used in the calculated columns. That way the reports can up to date also.
This is a single user system for now. Any ideas why the calculated columns are not visible? Is there some setting I have to do? I use this method on other forms that have no calculated columns and it all works.
Thanking you in advance for any help.
Cheers, Boris
strive4peace
Hi Boris,

do your calculated controls start with =
?

what is an example of a calculated ControlSource that is displaying an error?
bubu678
Thank you for replying. Yes, all the controls began with "=". All of the controls has omething like this "=ufSingleCost([Cpt_SAV_CW],[ID],"Cpt_UTIL_CW",[MCRNo])", where I have user-defined functions defined in a Module.
I have re-written some of the areas and created a query just for updates and the method that I did to update in the form has been changed to do after a form Close event.
I would like to thank all that looked at his post.
Cheers,
Boris
strive4peace
Hi Boris,

it is better to calculate values when you need them rather than store calculated values

A Discussion on Storing Calculated Values and Audit Trails, by GroverParkGeorge
http://www.utteraccess.com/forums/showflat...p;Number=334811
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.