I have a Part Number field that when is updated, populates a Part Name field. It works fine with the current 15 digit Part Number but they are changing the Part Name to be associated with the first 5 characters of the Part Number.
Ex Part No PartName
Old 123456789012345 Bracket
New 12345 Bracket
I think it sounds like a simple change but I am getting syntax errors with my code. Below is my existing code that I want to change to look at the first 5 characters of the txtPartNo field.
DLookup "[PartName]","tblPartName","txtPartNo= [PartNo]"
Can't I just do a left(txtPartNo,5) in the DLookup command? When I try I am getting a syntax error with the comma. Please help.
Ex Part No PartName
Old 123456789012345 Bracket
New 12345 Bracket
I think it sounds like a simple change but I am getting syntax errors with my code. Below is my existing code that I want to change to look at the first 5 characters of the txtPartNo field.
DLookup "[PartName]","tblPartName","txtPartNo= [PartNo]"
Can't I just do a left(txtPartNo,5) in the DLookup command? When I try I am getting a syntax error with the comma. Please help.