Copying values from place to place

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

Guest

Hello community:

Is it possible say, to type a value in a textbox in one form (Form A),
automatically copy that value, then open another form( Form B) and
automatically paste that value into another textbox in Form B? Is this
possible?

Thank you for your help.

-Gabriel M.
 
If you open Form B from Form A you can use the OpenArgs of the OpenForm
command line to pass a value to Form B.

docmd.OpenForm "FormName",,,,,,Me.TextBoxName

On the OnLoad event of the Form B you can use set the value in the text box
If not IsNull(Me.OpenArgs) Then
Me.TextBox = Me.OpenArgs
End If
 
Hello community:

Is it possible say, to type a value in a textbox in one form (Form A),
automatically copy that value, then open another form( Form B) and
automatically paste that value into another textbox in Form B? Is this
possible?

Thank you for your help.

-Gabriel M.

Well... don't make the common mistake of misinterpreting the nature of Forms.
They don't contain ANY data - you don't put data into a Form; instead you use
a Form as a tool to store data in a Table. Data is stored in tables, and
*only* in tables!

It's quite possible to have two different forms bound to the same table, for
different purposes. If you're trying to store the same value redundantly in
two different tables, though, you should reconsider; this is essentially
*never* a good idea. What is this value, and what are the two places you want
to put it?

John W. Vinson [MVP]
 
John:
Value in Form A is a foreign key to the primary key in Form B. It is
necessary to first create the primary key, I understand that. However,
my question really is, "Is it possible to type in a textbox a value and have
that entry recognizable (and pasted) in another Form before the Update
event?"
 
Back
Top