Query Left Command Help

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

mattc66 via AccessMonster.com

Hi All,

I want to find the first 2 or 3 letter in the field. The data is the users
initial followed by a number. Sometimes they enter there 2 or 3 letter
initials. What can I do to find the first 2 or 3 letters and omit the numbers?


Thanks
Matt
 
You could try the following UNTESTED expression.

Left([FieldName],IIF(IsNumeric(Mid([FieldName),3,1),2,3))

--
John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
I think it should be:

Left([FieldName],IIF(IsNumeric(Mid([FieldName),3,1)),2,3)

John
I get a message saying "wrong number of arguments" after the ,1)
You could try the following UNTESTED expression.
[quoted text clipped - 5 lines]
 
Below the syntax. Thank you
Left([FieldName],IIf(IsNumeric(Mid([FieldName],3,1)),2,3))


J_Goddard said:
I think it should be:

Left([FieldName],IIF(IsNumeric(Mid([FieldName),3,1)),2,3)

John
I get a message saying "wrong number of arguments" after the ,1)
[quoted text clipped - 3 lines]
 

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

Back
Top