Hi. I am using Access 2007 and am trying to remove the version from certain item codes. Examples of some of the item codes are listed below. The version portion I am trying to remove is -YY.
V42273-Z2-A12
H50402-B509-A43
S42024-L5349-A1-YY
TNX:A4B0000007988-YY
I have tried to use the below code and it works, but for the items without the -YY, it returns an error.
Base Material: Left([Material],InStr([Material],"-YY")-1)
What I would like to do is have even the item codes with the YY be returned as is.
For example, the above list would look lie this after running the query.
V42273-Z2-A12
H50402-B509-A43
S42024-L5349-A1
TNX:A4B0000007988
Any help would be greatly appreciated as I am by no means an expert in Access. I am learning as I go.
Thanks for you help.
V42273-Z2-A12
H50402-B509-A43
S42024-L5349-A1-YY
TNX:A4B0000007988-YY
I have tried to use the below code and it works, but for the items without the -YY, it returns an error.
Base Material: Left([Material],InStr([Material],"-YY")-1)
What I would like to do is have even the item codes with the YY be returned as is.
For example, the above list would look lie this after running the query.
V42273-Z2-A12
H50402-B509-A43
S42024-L5349-A1
TNX:A4B0000007988
Any help would be greatly appreciated as I am by no means an expert in Access. I am learning as I go.
Thanks for you help.