I looked at a video on how to write a DLookup, and came up with this, but I get a run time error, something about a missing
operator. This is an after update event, and when working will help me auto populate to save lots of time, for data entry in
a manufacturer of automotive parts. The database is designed to collect data on the part numbers that are run during one of
the 3 8hr shifts, and report efficiencies of various conditions. After the part number field is updated I need 5 other fields
to populate. I have the part number data, which is the data used to have the database go I recognize this part number, it has
this cycle time, and this cavities, and this description, and this tool number, and belongs to this customer. Below is the
code I made, and the Run Time Error I got when trying to run it, and I do not know how to debug it!!!!
Customer = DLookup (“Customer” , “PartNumbersT” , “PartNumber=” & PartNumber)
Description = DLookup (“Description” , “PartNumbersT”, “PartNumber=” & PartNumber)
Cavities = DLookup (“Cavities” , “PartNumbersT”, “PartNumber=” & PartNumber)
CycleTime = DLookup (“CycleTime” , “PartNumbersT”, “PartNumber=” & PartNumber)
ToolNumber = DLookup (“ToolNumber” , “PartNumbersT”, “PartNumber=” & PartNumber)
Trying to get 5 fields to auto populate from a table that stores data based on the part number field, and what is entered,
when I try to run this code I get
Run time error '3075':
Syntax error (missing operator) in query expression 'PartNumber='
Thank you for your time, and have a great day!