Help needed passing data from the form to a table.


Access Newbie

I have several tables that are joined with a query and displayed in a
form called “Comparison”. On one side of the form is Table1 that
displays its data. On the other side is Table2, which displays its
data. I use this form to do a side by side comparison and make
changes to Table1 when there are discrepancies. Much of the
information is taken from a comments field which is why I can’t just
do the comparisons in a simple query.

Once the I have checked the data and made changes, if necessary, I
want to pass two of the data controls (Table1_ID and Table2_ID) to
another table, called “Done” (which is linked to the other tables in
the associated query). The fields in the “Done” table that I need
populated are called TBL1_ID and TBL2_ID, respectively. I would like
this to happen when I click a button. I would like the button to check
the table “Done” first to make sure the data does not already exist in
the “Done” table. Both IDs are unique and associated with each other,
so only one ID needs to be checked for both to be appended. If it
exists, just go to the next record in the form, if not, append the
data from the data controls (Table1_ID and Table2_ID) from the
“Comparison” form to the fields TBL1_ID and TBL2_ID in the “Done”,
make the "Updated" field in the "Done" table "Yes" (Yes/No data type),
and then go the the next record.

It has been years since I have done this type of thing, and I can’t
for the life of me remember how to do it. Can it be done using macros,
or do I need to use VBA to accomplish this? If so, could someone
please help me write this code? Once I see how it is done, I am sure I
can do the remainder on my own.

BTW, if relevant, the query is complex and my form is read only. I do
the edits, when necessary, in another form linked just to Table1 which
is also open. Using Access 2007.

Thanks in advance.



Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question