South Africa’s biggest forum. Discuss, discover, and connect with thousands of members.
It is a product ID.What is the name of the field you're using InStr on?
IIRC, Access is really finicky about punctuation and other non-alphanumeric characters.
Regional settingsYeah like Excel won't accept a . in our currency
ie R14.50 doesn't work
but R14,50 does work
Frigging American Logic![]()
Please explainRegional settings
Ah cool, Im on MACWindows 10 default for list separators differ from region to region.![]()
instr returns a position... not a text string?It is a product ID.
It's formatted with numbers, a forward slash, number for the month, another forward slash and the year.
e.g. 12346789/2/2021
I would like to extract the number before the first slash.![]()
I know. I want to find the position of the slash and combine it with the Left function.instr returns a position... not a text string?
instr(1,myField,"/") is the position
Maybe post the code segment?I know. I want to find the position of the slash and combine it with the Left function.![]()
Did it work?Code:TestInstr: Left([ProductID], InStr([ProductID], "/") - 1)
Yep, works fine on my side. Access 2016. Double check that the brackets line up in your formula, you might have missed a closing bracketDid it work?
Which version of access are you using?
I don't believe it. I copied your formula and now it works.Yep, works fine on my side. Access 2016. Double check that the brackets line up in your formula, you might have missed a closing bracket
Thank you for the suggestion. However, the wizards in Access makes everything so easy to use.I would suggest, if possible, to change your Access backend to MariaDB.
You still use the Access as frontend, but backend is then much stabler and provide a nice performance boost.
I completely understand.Thank you for the suggestion. However, the wizards in Access makes everything so easy to use.![]()