Access 2000 - Eliminate characters in a field

A

Abay

Hello ... I would like to eliminate the first three characters in a field.
Any help would be much appreciated.

Abay
 
B

Brendan Reynolds

UPDATE TestTable SET TestTable.TestField = Mid$([TestField],4)
WHERE (((TestTable.TestField) Is Not Null));

Where 'TestTable' is the name of your table and 'TestField' is the name of
the field you want to update.

Note that the result will be an empty string if 'TestField' originally
contained three characters or less. You might need to modify the query if
that's not the result you want.

As always before performing any bulk update, it would be wise to test this
on a copy of your data first.
 
D

dcichelli

Hello ... I would like to eliminate the first three characters in a field.
Any help would be much appreciated.

Abay

Easy,,,

Say the name of your field is "name"

Then you can run a query and in the criteria field enter:

Right([name],(Len([name])-3))
 
A

Abay

Many thanks for both replies ... tried both ... on a test set :) and they
work like a charm ...

Most appreciated

Abay

Brendan Reynolds said:
UPDATE TestTable SET TestTable.TestField = Mid$([TestField],4)
WHERE (((TestTable.TestField) Is Not Null));

Where 'TestTable' is the name of your table and 'TestField' is the name of
the field you want to update.

Note that the result will be an empty string if 'TestField' originally
contained three characters or less. You might need to modify the query if
that's not the result you want.

As always before performing any bulk update, it would be wise to test this
on a copy of your data first.

--
Brendan Reynolds
Access MVP

Abay said:
Hello ... I would like to eliminate the first three characters in a
field. Any help would be much appreciated.

Abay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top