I did some searches but can't find my exact problem. I will try to explain what I am doing so everyone can visualize it. I am trying to mass add some information from an import and to do so I need to do a lookup of one table to fill in the value on another. I listed the 2 tables below with their corresponding fields. I did an update query on ImportTest table with only Category_ID from the ImportTest table showing. I want to update it to the [Directory].[ID] value where the Department, Division, Function and Category are equal for both tables. There is only going to be one record that matches. I listed the expression I have been working on below in code tags.
Directory (Table)
ID <--Number I need
Department (Text)
Division (Text)
Function (Text)
Category (Text)
ImportTest (Table)
ID
Category_ID (Number)<--need to fill in number here
Department (Text)
Division (Text)
Function (Text)
Category (Text)
Code:
=Dlookup ("ID","Directory","Department = [ImportTest].[Department] And
Division = [ImportTest].[Division] And
Function = [ImportTest].[Function] And
Category = [ImportTest].[Category]")