1

I am new at this so I apologize for any stupid questions.

Objective: When the user selects a location (Combo box) for an item previously selected, I want dlookup to give me a numeric value (QPC) saved in a other table. All the information is save an a new table.

Row source for item: SELECT Main.ITemID, Main.Description FROM Main;

Row source for location: SELECT Location.Location, Location.Description FROM Location;

Originally, table Main had the numeric value (QPC) saved in the same record as the item. I moved the value to a different table Item_Detail

I will change 15132-0A020 to the value selected but for now I am hardcoding it because I can't get it to work. Also, I have google Error 2465 but I get more confused the more I read.

Private Sub Location_AfterUpdate()
DoCmd.OpenTable "item_Detail"
Me.Units_in_UOM.Visible = True
Me.Units_in_UOM = DLookup([QPC], "Item_Detail", "[ItemId]=15132-0A020")
End Sub
DuDa
  • 3,718
  • 4
  • 16
  • 36
Juan
  • 21
  • 2

0 Answers0