auto number

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

Guest

I deleted out my auto number in my table and added a field
called Account number/text field.
My last account number is 470. In my next NEW record, how
can I get the last account number to add 4 digits and give
me 474, next new record 478. I know how to do this with
autonumber but not text. Thanks, SF
 
SF,

Any reason for choosing a text data type rather than number?

- Steve Schapel, Microsoft Access MVP
 
My last account number is 470. In my next NEW record, how
can I get the last account number to add 4 digits and give
me 474, next new record 478.


= Format(DMax("CInt(AccountNumber)", "MyTable")+4),"000")

but you will need to trap the NULL error that occurs when entering the
first record in the table.

But I have to wonder, like Steve, why you chose a text field, when you want
it to count...

HTH


Tim F
 
Back
Top