Copy and Paste text?

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

Guest

Hi,

Is there any way to Copy the text from an unbound text
box. And Paste it into a text box that's bound to a table
column, So it will update the table?

When I try this basic method:
Me!Current user = Me!txtName

I get an error stating that the value for the bound
textbox (txtName) can't be set.
I'd prefer to stay away from queries if possible and do it
with code.

Thanks.
 
Is there any way to Copy the text from an unbound text
box. And Paste it into a text box that's bound to a table
column, So it will update the table?

When I try this basic method:
Me!Current user = Me!txtName

I get an error stating that the value for the bound
textbox (txtName) can't be set.

But your line of code is trying to set the value of "Me!Current user" (which, if
this is not a typo, should read "Me![Current user]") to the value contained in
"Me!txtName", not the other way around.
 
I've tried it both ways.
And with all different types of enclosures.
Even going as far as to try to tell it exactly what to
paste into the field that is bound to the table.
Example: Me!txtName = "Success!"


In every instance. The error message is the same.
"Run-Time error 2448. You can't assign a value to this
object".
 
I've tried it both ways.
And with all different types of enclosures.
Even going as far as to try to tell it exactly what to
paste into the field that is bound to the table.
Example: Me!txtName = "Success!"


In every instance. The error message is the same.
"Run-Time error 2448. You can't assign a value to this
object".

Can you type a value into the textbox? If not, check to see that the "Control
Source" property for that control is actually a field and does not begin with
"=" (that would be a "calculated" control, which you can't assign a value to).
 
Thanks Bruce.

Yes I could type text into the field.
The problem turned out to be that I was putting this code
into a section of the form where some If statements were
located. And it caused this error.

Once I placed that code in the GotFocus property for that
text box. It worked fine.
The simple fact that you said it should work helped me
find the problem.


Thanks.
 
Back
Top