i'm trying to assign a value to a textbox field??

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i swear this was working.. now im receiving an error message ("you can't
assign a value to this object") on the following line of code:

Me!StateName = rsStateAbbrv!StateName

This is a textbox field and is NOT visible... the form's record source is a
query... and when i step through the code.. rsStateAbbrv!StateName is a valid
value.

what's wrong with this?
 
i swear this was working.. now im receiving an error message ("you can't
assign a value to this object") on the following line of code:

Me!StateName = rsStateAbbrv!StateName

This is a textbox field and is NOT visible... the form's record source is a
query... and when i step through the code.. rsStateAbbrv!StateName is a valid
value.

what's wrong with this?

You've got the same name for the table field as for the control, and
Access may be confused about which is which. Try renaming the textbox
to txtStateName and use

Me!txtStateName = rsStateAbbrev!StateName

John W. Vinson[MVP]
 
that must have been it.. thanks so much!


John Vinson said:
You've got the same name for the table field as for the control, and
Access may be confused about which is which. Try renaming the textbox
to txtStateName and use

Me!txtStateName = rsStateAbbrev!StateName

John W. Vinson[MVP]
 
Back
Top