Unanswered: need to compare two tables and update one field
Sorry but I'm an Access VBA Noob... I have 2 tables, one with a set of number codes with descritions of the codes, like a lookup field i guess.
The other table has a unique id number and 3 other columns, column A,B,C. These columns have the codes from the first table in them. But each column over will override the one before it if the codes are different.
So basically what i want to do is go through the second table, open column C of codes(4th column in the table and most hierarchial) check to make sure it is valid checking it against table 1, if it is I would like to put it into a new 4th code Column D (final code). If that isnt a valid code or is empty I would like to go to the less powerful column B, check it against table 1 codes and apply it to column D if it is valid. Samething if it isnt valid, just using column a instead of b... I'm using access 97. Thanks for any help.
If column C is valid Then
column D = column C
If column B is valid Then
column D = column B
If column A is valid Then
column D = column A