I have a table with a field named WONumber. It is input by a barcode scanner and is a Text field of the order number (long) and item number (txt) and is represented like this @@@@@-@@@@. After the dash in the field the remaining string is of variable lengths, so I am doing this to get a Dlookup on a time punch form:
=DLookUp("JobName","tblOrders","OrderNumber= " & Left([Forms]![frmTimePunch]![txtWONumber],5))
Which works perfectly!
The problem comes when I want to lookup the text field (the part of the string after the dash):
=DLookUp("Description","tblOrderDetails","[ItemNo] = '" & Mid([Forms]![frmTimePunch]![txtWONumber],7) & "'")
What the heck am I missing?
Thanks in advance for my lack of misunderstanding string contatenation.
=DLookUp("JobName","tblOrders","OrderNumber= " & Left([Forms]![frmTimePunch]![txtWONumber],5))
Which works perfectly!
The problem comes when I want to lookup the text field (the part of the string after the dash):
=DLookUp("Description","tblOrderDetails","[ItemNo] = '" & Mid([Forms]![frmTimePunch]![txtWONumber],7) & "'")
What the heck am I missing?
Thanks in advance for my lack of misunderstanding string contatenation.