In my Access 2007 Form, I was previously successful in setting the controlSource of a textbox, directly in the properties window, using this code
=UCase(Left([txtLName],6) & "_" & Left([TxtFName],1))
However, in an attempt to hard-code this into the form, I'm trying to use VBA to set the controlSource property using this code:
Me.txtCodePersonal.ControlSource = "=UCase(Left([txtLName],6) & "_" & Left([TxtFName],1))"
In my debug, it address my problem to the "_"
section of this line.
I don't know how the controlSource property work in VBA, so I don't know how to correct this. Thank for all your help in advance.