Update with incrementing values

  • Thread starter Thread starter Razor
  • Start date Start date
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
 
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
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
Back
Top