Here is the statement in my query:
ItemType: Left([itemNumber],InStr(1,[itemNumber],"-")-1)
It takes the following string "M4-1234567" and displays everything before the hyphen. Yet when someone doesn't type in a hyphen it gives me an error. This prevents me from generating my report. How can I fix this other than beating the person(s) who didn't type in the hyphen?
ItemType: Left([itemNumber],InStr(1,[itemNumber],"-")-1)
It takes the following string "M4-1234567" and displays everything before the hyphen. Yet when someone doesn't type in a hyphen it gives me an error. This prevents me from generating my report. How can I fix this other than beating the person(s) who didn't type in the hyphen?