Apr 17 2007, 12:26 PM
1 Form with an unbound text box that I input a string like this: JA85YY777
After Update of the unbound text box, a macro fires with a setvalue
Setvalue contains a mid funciton to pull the "YY" from the inputted data and populate into a second unbound text box.
When I test the form, I continue to get "Type Mismatch" when it tries to set the value. Error message contains
Apr 17 2007, 02:12 PM
Do you have code in your txt controls that may be setting something to a variable?
Can you post the code associated with this Form?
If the controls are unbound then there should not be a problem unless you have some code behind them...
Apr 17 2007, 02:13 PM
instead of using a macro, put this on the control AfterUpdate event:
if isnull(controlname1) then exit sub
if len(me.controlname1) < 9 then
msgbox "required format is AA99YY999",,"Enter new code"
me.controlname_yy = Mid(me.controlname1,5,2)
How To Get Started Programminghttp://www.utteraccess.com/forums/showflat...;Number=1230004