stripping off the end of data in a field.

  • Thread starter Thread starter susan
  • Start date Start date
S

susan

Subject: Re: stripping off dash
From: "(e-mail address removed)"
<[email protected]> Sent: 7/15/2004
9:01:46 AM
It still doesen't work. Help would be appreciated. I
created an update query with field 3, and
pasted >Format(Val(Replace(xxx, "-", "")), "00\-00000")
into the update line and received an error message. Is
replace a function under access 2000.
 
Try this.
Extract part of existing text values using a calculated
field using Left, Right and Mid functions.

The syntax for these functions is:

Left(stringexpr,n)
Right(stringexpr,n)
Mid(stringexpr,start,n)

The stringexpr argument can be either a field name
(enclosed in brackets) or a text expression; n is the
number of characters you want to extract; start is the
position of the first character you want to extract.

The following table shows examples of these functions.

If the value in
Part ID is
This expression
Returns
BA-7893-R12 Left([PartID],2) BA
BA-7893-R12 Right([PartID],3) R12
BA-7893-R12 Mid([PartID],4,4) 7893
 
Back
Top