Stripping away Syntax

  • Thread starter Tanya via AccessMonster.com
  • Start date
T

Tanya via AccessMonster.com

Hi,

i'm wondering if its possible to strip away syntax for a field

what i have is some records that show WTR-123 for example but they need to
show as WTR123
trouble is the hyphen is not always in the same place ie WT-1234 for example

can this be done
thanks

Tanya
 
D

Duane Hookom

Open the table in datasheet view and select Edit->Replace and replace all
"-" with nothing within the field.
 
T

Tanya via AccessMonster.com

thanks Duane,

but this needs to be when importing the s/sheet into access so a function is
needed.

the user does not have access to the tables.

Tanya


Duane said:
Open the table in datasheet view and select Edit->Replace and replace all
"-" with nothing within the field.
[quoted text clipped - 10 lines]
 
T

tina

import your data, then run an Update query on the table, as

UPDATE TableName SET TableName.FieldName =
Replace([TableName].[FieldName],"-","");

replace TableName and FieldName with the correct table and field names, of
course.

hth


Tanya via AccessMonster.com said:
thanks Duane,

but this needs to be when importing the s/sheet into access so a function is
needed.

the user does not have access to the tables.

Tanya


Duane said:
Open the table in datasheet view and select Edit->Replace and replace all
"-" with nothing within the field.
[quoted text clipped - 10 lines]
 
D

Duane Hookom

You can run an update query against the imported records. Use the Replace()
function to replace the "-" with nothing.

--
Duane Hookom
MS Access MVP
--

Tanya via AccessMonster.com said:
thanks Duane,

but this needs to be when importing the s/sheet into access so a function
is
needed.

the user does not have access to the tables.

Tanya


Duane said:
Open the table in datasheet view and select Edit->Replace and replace all
"-" with nothing within the field.
[quoted text clipped - 10 lines]
 
Top