Remove unwanted data

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

Guest

Hello-

I am sorry if this has been answered but i just cannot get this to work.

I have a table named "email" on which I have a field named "subject".

There are 3 characrters at the begginning of every entry that I want gone.

Can someone please give me a step by step on how to do this.

I am a beginner so please take it easy on me.



Much thanks,

Erik
 
Create an Update query and put this in the Update To part of the grid you see
in design view.
Right([subject], Len([subject])-3)
This measures the lenght of the data in the field, subtracts three from
that, and replace the current data with the same but missing the first three
characters.
 
Hi Erik -
Step 1 - back up the data just in case
Step 2 - create a new query using the table called email (Query, New,
Design view, Okay. Double click table called email, then close out
the Show Table dialog window).
Step 3 - still in your query - double click the field subject to put
it in the grid
Step 4 - since you're a beginner, it's a good idea to first test your
logic by viewing the "new field" contents - so you're going to create
a new field in the second column. Type this in the first row of the
second column:
NewField:Mid([subject],3)
Step 5 - run that query using the exclamation point just to make sure
this is going to work for you. You should see your original field in
the first column; new contents in the second column
Step 6 - assuming the second column is what you want, go back to
design view of your query (the first icon), and from the menu bar
select Query, Update to change this to an update query. Do NOT use
the exclamation point until told.
Step 7 - A new row appears called Update to. In the first column,
type (or copy) Mid([subject],3) in the Update to row. If you copy it
from your second column, be careful to not include the title name
NewField.
remove the second column totally (position cursor anywhere in the
column, then from menu bar select Edit, Delete columns).
Step 8 - you are ready to UPDATE your data. Once you click the
exclamation point the contents of your subject field will now be the
subject field minus the first three characters. (You will be asked to
confirm that you want to do this - once you click YES, it simply does
it).
No need to save the query (it's kinda dangerous to keep around,
because if it was run again, you would lose the NEXT 3 beginning
letters).

Have fun.

Cindy
 
Cindy, thank you very much, that worked perfect.



Cindy said:
Hi Erik -
Step 1 - back up the data just in case
Step 2 - create a new query using the table called email (Query, New,
Design view, Okay. Double click table called email, then close out
the Show Table dialog window).
Step 3 - still in your query - double click the field subject to put
it in the grid
Step 4 - since you're a beginner, it's a good idea to first test your
logic by viewing the "new field" contents - so you're going to create
a new field in the second column. Type this in the first row of the
second column:
NewField:Mid([subject],3)
Step 5 - run that query using the exclamation point just to make sure
this is going to work for you. You should see your original field in
the first column; new contents in the second column
Step 6 - assuming the second column is what you want, go back to
design view of your query (the first icon), and from the menu bar
select Query, Update to change this to an update query. Do NOT use
the exclamation point until told.
Step 7 - A new row appears called Update to. In the first column,
type (or copy) Mid([subject],3) in the Update to row. If you copy it
from your second column, be careful to not include the title name
NewField.
remove the second column totally (position cursor anywhere in the
column, then from menu bar select Edit, Delete columns).
Step 8 - you are ready to UPDATE your data. Once you click the
exclamation point the contents of your subject field will now be the
subject field minus the first three characters. (You will be asked to
confirm that you want to do this - once you click YES, it simply does
it).
No need to save the query (it's kinda dangerous to keep around,
because if it was run again, you would lose the NEXT 3 beginning
letters).

Have fun.

Cindy


Hello-

I am sorry if this has been answered but i just cannot get this to work.

I have a table named "email" on which I have a field named "subject".

There are 3 characrters at the begginning of every entry that I want gone.

Can someone please give me a step by step on how to do this.

I am a beginner so please take it easy on me.

Much thanks,

Erik
 
Back
Top