Access does not seem to have FIND function. I need to capture Last
Name + Comma + First 4 Characters of First name. In the Mid function
since last names are variable length, I need to determine the location
of the comma within the field, then capture from 1 to Comma plus 5
characters.
This works in Excel, and I updated Access to read as follows:
=MID([Name],1,FIND(",",[Name])+5)
Access does not like FIND though
George Nicholson - 29 Mar 2007 19:30 GMT
=Mid([Name],1,Instr(1,[Name],",")+5)
> Access does not seem to have FIND function. I need to capture Last
> Name + Comma + First 4 Characters of First name. In the Mid function
[quoted text clipped - 7 lines]
>
> Access does not like FIND though
Jerry Whittle - 29 Mar 2007 19:32 GMT
In Access it's Instr().
Debug.Print Left("Whittle, Jerry",Instr("Whittle, Jerry",",")+ 5)

Signature
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
> Access does not seem to have FIND function. I need to capture Last
> Name + Comma + First 4 Characters of First name. In the Mid function
[quoted text clipped - 7 lines]
>
> Access does not like FIND though
Bill Edwards - 29 Mar 2007 19:34 GMT
=left([Name], instr(1,[Name],",") + 5)
By the way it is bad practise to name a field or variable NAME
It is also bad practise to have a field that contains both lastname and
firstname
> Access does not seem to have FIND function. I need to capture Last
> Name + Comma + First 4 Characters of First name. In the Mid function
[quoted text clipped - 7 lines]
>
> Access does not like FIND though