Display only the alpha characters in a field w/both alpha&numeric.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Using Access97, how can I display a field result as only the alpha characters
(which are variable from 2-4 but always followed by a space)? Example: BEN
3=BEN; CHOW 3455=CHOW.
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Use a combination of VBA functions:

Left(col_name, Instr(1,col_name, " ") - 1)

This might blow up if the value of col_name is NULL. Test it.

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

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

iQA/AwUBQcFE/YechKqOuFEgEQIGNACg6dDt+en5fnm3fNt54GFaFDzWDIkAnRTr
0ROeNs7SI1Zh7Dm51+lP8P74
=gG0K
-----END PGP SIGNATURE-----
 
Back
Top