Extracting Part of a Text field in Query

  • Thread starter Thread starter bmistry
  • Start date Start date
B

bmistry

Hi,

I have a query that holds employee names which i am
planning on using in a mail merge to create letters to the
employees. However, the employee name is stored in the
format: [LastName,FirstName].

Is there anyway of switching the two around or exracting
the first and last names into seperate field. I know this
is capable in Exel using the MID, LEFT, RIGHT functions
together with the FIND function. However, the FIND
function doesn't work in the MS Acess Query.

Any help is much appreciated.

Many thanks

bmistry
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Use the InStr() function in place of the Excel Find function. E.g.:

LastName: Left(Name, Instr(Name,",")-1)
FirstName: Mid(Name, Instr(Name, ",") + 1)

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQVB0AIechKqOuFEgEQLRYwCgoZGhSDXFO7hhhDj90VZLDdtiLZgAoI8L
BBT18zDm1WW2ddUyF2qet/nS
=p3P7
-----END PGP SIGNATURE-----
 
Thanks so much - it worked perfectly!
-----Original Message-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Use the InStr() function in place of the Excel Find function. E.g.:

LastName: Left(Name, Instr(Name,",")-1)
FirstName: Mid(Name, Instr(Name, ",") + 1)

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQVB0AIechKqOuFEgEQLRYwCgoZGhSDXFO7hhhDj90VZLDdtiLZ gAoI8L
BBT18zDm1WW2ddUyF2qet/nS
=p3P7
-----END PGP SIGNATURE-----

Hi,

I have a query that holds employee names which i am
planning on using in a mail merge to create letters to the
employees. However, the employee name is stored in the
format: [LastName,FirstName].

Is there anyway of switching the two around or exracting
the first and last names into seperate field. I know this
is capable in Exel using the MID, LEFT, RIGHT functions
together with the FIND function. However, the FIND
function doesn't work in the MS Acess Query.

.
 
Back
Top