Left and Instr function

  • Thread starter mohsin via AccessMonster.com
  • Start date
M

mohsin via AccessMonster.com

Hi

Need your help please:
My field have:
mohsin
mohsin,ismail

I'm using this code to get mohsin from left :
CGR1: IIf(Left([tbl_route]![CGR_NAME],InStr([tbl_route]![CGR_NAME],",")-1),
[tbl_route]![CGR_NAME])

the result is #ERROR and mohsin,ismail

can you advise me, what is the right code, please.

thank you.
 
K

Ken Snell \(MVP\)

Try this:

CGR1:
IIf(InStr(([tbl_route]![CGR_NAME],",")>0,Left([tbl_route]![CGR_NAME],InStr([tbl_route]![CGR_NAME],",")-1),[tbl_route]![CGR_NAME])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top