Help needed passing data from the form to a table.

Discussion in 'Microsoft Access Form Coding' started by Access Newbie, Jul 9, 2012.

  1. 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.

    Desiree
     
    Access Newbie, Jul 9, 2012
    #1
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tom
    Replies:
    7
    Views:
    352
    Albert D.Kallal
    May 12, 2005
  2. Guest

    Passing Data from an Access table to a Variable in VB code

    Guest, Dec 7, 2005, in forum: Microsoft Access Form Coding
    Replies:
    6
    Views:
    232
    George Nicholson
    Dec 8, 2005
  3. Guest

    Passing a value from a form to another table

    Guest, Jan 30, 2007, in forum: Microsoft Access Form Coding
    Replies:
    0
    Views:
    166
    Guest
    Jan 30, 2007
  4. Sophie

    Help needed passing form's name to module

    Sophie, Apr 21, 2008, in forum: Microsoft Access Form Coding
    Replies:
    2
    Views:
    339
    Sophie
    Apr 21, 2008
  5. Pat Dools

    Passing ID from Form A to Form B and closing Form A

    Pat Dools, Mar 28, 2009, in forum: Microsoft Access Form Coding
    Replies:
    8
    Views:
    331
    Tony Toews [MVP]
    Mar 31, 2009
Loading...

Share This Page