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

How do I insert additional data to a field?

Status
Not open for further replies.

johngordon

Technical User
Jun 29, 2002
112
US
I have a field in a table that is named ID, it contains record numers from 1 to 2000.

I want to insert 03- into each record so the ID number will look like 03-000001 and so on.

I thought I could do this using find and replace, but it does not work. Anyone have any suggestions?

Thanks,

John
 
Hi,

In order to store a leading zero and a hyphen the data type of the field must be text (rather than numeric).

If this is the case, then a simple Update query could do the job.

John
 
John,

Change the format of the field within the table from number to text.

Run this line of SQL:

UPDATE YourTable SET YourTable.YourFieldName = "03-" & [YourFieldName]

or create an update query and make this your Update To: criteria ("03-" & [YourFieldName].

hope this helps you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top