Set Textbox Default Equal to Another Textbox

DBFIN

Registered User.
Local time
Today, 10:21
Joined
May 10, 2007
Messages
205
I have a textbox called Average. I want to create the default value to be the average of five other textboxs called: Value1, Value2,... Value5. What syntax do I use in the default value property ? The following simple syntax does not work.

= ([Value1] + [Value2] + .... [Value5]) / 5
 
Last edited:
Because you want the value as a default this means it will only happen when the form is first opened.

You could get round this by removing the value in the calculated field on the afterupdate on the Value fields as follows:
 
Thanks for responding James. You say to remove the value "as follows" but didn't finish your thought. Were you going to add an example of how to do this ?
 
Ooops! Here ya go:

Me!CalcFieldName = Null

NB: You will need to replace 'CalcFieldName ' with the real field name of the calculated field and put the line of code on the AfterUpdate of each of the other fields.
 

Users who are viewing this thread

Back
Top Bottom