Data copying question

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

I was wondering if it was possible to copy data from one
form to another (or, I suppose, from one table to
another). For example, let's say I have Form A that sends
data entered on it to Table A. Now let's say I have a
field in Form B (which sends data to Table B) that matches
a field in Form A (let's also assume that they have to be
separate forms and tables, by the way). Since I don't
want to have to re-enter data, is there a way I could copy
the value from Form A and put it into the corresponding
field in Form B? If not, is there a way to get the data
from Table A to the corresponding field in Table B?
Thanks for the help.
 
-----Original Message-----
I was wondering if it was possible to copy data from one
form to another (or, I suppose, from one table to
another). For example, let's say I have Form A that sends
data entered on it to Table A. Now let's say I have a
field in Form B (which sends data to Table B) that matches
a field in Form A (let's also assume that they have to be
separate forms and tables, by the way). Since I don't
want to have to re-enter data, is there a way I could copy
the value from Form A and put it into the corresponding
field in Form B? If not, is there a way to get the data
from Table A to the corresponding field in Table B?
Thanks for the help.
.
Hi Steve,

Great name by the way...What I would do in your instance
is actully use an update query using a parameter to update
the other table. For example, let's say you fill in the
info for Form A that has an ID of 100. When you complete
the form you can put in an update query before you exit
the form. The query will be based on the table for form B
and you would enter the parameter for the matching field
ID in table B as such "=forms!fFormA!txtID" in the
criteria section. This will only update the record in
table B that matches the ID in Form A.

Then place any of the fields you wish to update to the
update query and reference the fields accordingly. For
example, let's say you want to copy the "Desc" field from
Form A to the "Description" field in table B. Drag the
field "Description" into the QBE and in the update to
field enter "=Forms!fFormA!txtDesc" This will copy any of
the data in that form into table B. What's nice about
this is that you can copy any field from the form even if
the field names are different. In addition, if there are
no matching IDs, then nothing gets updated.

Good luck.
 
Back
Top