Hi
I've got something that worked in older versions of Access, but Access 2010 (and perhaps 2007) is giving problems.
I've got a generic builder for a text box on a form. The builder will assist the user to enter data, and then add that value to the text box. Under normal circumstances the control's before and after events does not fire when the builder populates the control, so we've added code in the builder to call the procs explicitely of the control with something like...
Eval(Forms.MyForm.UserName_AfterUpdate())
And that works.
But since it is a generic builder, I need to work with some variable or control, so I try the following and it fails.
myVar = "Forms.MyForm.UserName"
Eval (myVar & "_AfterUpdate()") or...
Eval("Forms.MyForm.UserName_AfterUpdate()")
Error: Access failed to evaluate one or more expressions because 'UserName_AfterUpdate' was referenced in an expression.
Which kind of makes sense, but it was working in Access 97 - 2003. Not anymore.
Any hints to fire the Before and AfterUpdate events when using a generic builder?
I've got something that worked in older versions of Access, but Access 2010 (and perhaps 2007) is giving problems.
I've got a generic builder for a text box on a form. The builder will assist the user to enter data, and then add that value to the text box. Under normal circumstances the control's before and after events does not fire when the builder populates the control, so we've added code in the builder to call the procs explicitely of the control with something like...
Eval(Forms.MyForm.UserName_AfterUpdate())
And that works.
But since it is a generic builder, I need to work with some variable or control, so I try the following and it fails.
myVar = "Forms.MyForm.UserName"
Eval (myVar & "_AfterUpdate()") or...
Eval("Forms.MyForm.UserName_AfterUpdate()")
Error: Access failed to evaluate one or more expressions because 'UserName_AfterUpdate' was referenced in an expression.
Which kind of makes sense, but it was working in Access 97 - 2003. Not anymore.
Any hints to fire the Before and AfterUpdate events when using a generic builder?