Originally Posted by
Freddie81
...I removed the source from both text boxes to make them unbound and now they show the values...(
That sounds like you had the values assigned by having an expression in the Control's Control Source Property...is that correct? That would be responsible for not allowing it to be set using code in the Form_Load event.
Also,
Originally Posted by
Freddie81
...I've noticed that In some situations code work and then in other the same doesnt work...I get an error that I cannot assign a value to this object...
Once again, do you (or have you, in the past) had the values assigned by having an expression in the Control's Control Source Property?
Another possibility involves the Datatype of the Field that the Control is Bound to. Many times things like ID numbers are defined as Autotype Fields, and thus cannot be set by VBA code or thru their Control Sources.
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007