Help needed passing data from the form to a table.

Discussion in 'Access Forms 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?

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

    Passing selected records from search form to main form

    Tony Scullion, Jul 28, 2003, in forum: Access Forms Coding
    Replies:
    0
    Views:
    90
    Tony Scullion
    Jul 28, 2003
  2. Doug MacDonald

    Passing RecordSource to Form from another form

    Doug MacDonald, Jun 21, 2004, in forum: Access Forms Coding
    Replies:
    2
    Views:
    98
    Doug MacDonald
    Jun 21, 2004
  3. Tom
    Replies:
    7
    Views:
    296
    Albert D.Kallal
    May 12, 2005
  4. Nelson
    Replies:
    3
    Views:
    124
    Nelson
    Jul 25, 2005
  5. rc51wv
    Replies:
    6
    Views:
    105
    George Nicholson
    Dec 8, 2005
  6. Susan L

    Passing a value from a form to another table

    Susan L, Jan 30, 2007, in forum: Access Forms Coding
    Replies:
    0
    Views:
    87
    Susan L
    Jan 30, 2007
  7. Sophie

    Help needed passing form's name to module

    Sophie, Apr 21, 2008, in forum: Access Forms Coding
    Replies:
    2
    Views:
    115
    Sophie
    Apr 21, 2008
  8. Pat Dools

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

    Pat Dools, Mar 28, 2009, in forum: Access Forms Coding
    Replies:
    12
    Views:
    195
    Tony Toews [MVP]
    Mar 31, 2009
Loading...