Update with incrementing values

R

Razor

Hi,

I need to write an update query that will populate a
unique-index field with some static text (e.g. "Invoice
#") followed by an incrementing number.

For example,

Invoice #00001 <-- record 1
Invoice #00002 <-- record 2
....

So that the 1000th record's field value would look like:
Invoice #01000 <-- record 1000

How would I write this query?

Thanks,

Razor
 
M

[MVP] S.Clark

Right$("00000" & InvoiceID,5)

Given that the # is always 5 characters.


--
HTH,

Steve Clark, Access MVP
FMS, Inc.
Professional Solutions Group
http://www.FMSInc.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Is your Access database too slow?
Are you ready to upgrade to SQL Server?
Contact us for optimization and/or upsizing!
http://www.FMSInc.com/consulting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 

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

Similar Threads

Update query with autonumber field 4
update for running sum 1
counter value 3
Update Query 1
Date update in append query 6
Update problem 4
Update query updates multiple times 1
Update problem 4

Top