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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating 1500 records in a column with the click of a button?

Status
Not open for further replies.

b31luv

Technical User
Feb 21, 2002
171
US
Can this be done?

Here is the twist. The records I am trying to update are all different and look like this A154, B982, C717, D559, Etc.

Here is how I am thinking.

If [Sample].SampleNum = A* Then
[Sample].SampleNumNew = * (Where as the * equals the remaining portion of the cell.)
Else
[Sample].SampleNumNew = [Sample].[SampleNum]
End If

I don't really want to type in all of the new numbers so any assistance will be greatly appreciated.
 
Are you trying to remove the first character so that A154 ould become 154?

If so, you can run an update query:

UPDATE Table1 SET Table1.SampleNum = Right([SampleNum],Len([SampleNum])-1)
WHERE (((Left([SampleNum],1))="A"));

Or like this is you want to have the user enter the first character to remove:

UPDATE Table1 SET Table1.SampleNum = Right([SampleNum],Len([SampleNum])-1)
WHERE (((Left([SampleNum],1))=[Enter Prefix]));


Just insert your table name and field name.

Hope this helps.

Jim DeGeorge [wavey]
 
Man that worked like a charm, thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top