Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pulling only certain characters from a field

Status
Not open for further replies.

aj3221

Technical User
May 14, 2008
79
US
I have a field (customer PO#) that has a 4 digit # which means nothing to us, then a “-“ dash, then a 2 character alpha-numeric code. I want to capture the 2 characters after the dash, not the entire #.

PO#
5200-C3
5200-H6

I want the report to show:

PO#
C3
H6
 
Is 'PO#' a heading? If so, you could get the part you want by
Code:
Right({your.field}, 2)
if lengths vary, you might use MID, or REPLACE to get rid of the 5200-. Or SPLIT on the dash.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top