Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2017

    Unanswered: Usng Dlookup and update query in VBA

    Hi All
    Am new to VBA and need as much assistance as possible please.

    I have a table called CLEANING.

    I need to replace values that are in the table with keys.
    So for example I have a field called ORIGIN which says ORIGIN A

    I need to be able to look at table TBLORIGIN and look for ORIGIN A, and then replace it with the value of the primary key OriginID in the CLEANING TABLE.

    So basically, I would look up originID where CLEANING.ORIGIN = TBLORIGIN_DESCR and replace CLEANING.ORIGIN with TBLORIGIN.ORIGINID

    Any ideas on how to do this please.

    Thank you

  2. #2
    Join Date
    Apr 2014
    Provided Answers: 35
    make a new key column
    join the 2 tables on the name, CLEANING.ORIGIN = TBLORIGIN_DESCR
    run an update query to fill in KEY field from other table.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts