Click to See Complete Forum and Search --> : AutoNumber shows less Numbers


myself1
06-11-2006, 05:26 AM
Hi,
My autonumber field in Access; when displayed in an ASP page, only shows the 'positive' numbers, and misses out the 0 (zero).

EG...ID = 'BR 0012'
Displays as 12

I ned ti to show the full text & number. Do I need to do any converting here?
Hope to hear.
TIA :)

russell
06-11-2006, 12:27 PM
'BR 0012'

is the value in your auto-number field?

myself1
06-11-2006, 05:12 PM
Yes...
Formated as "BR "0000

So each item added reads, Br 0001, Br 0002, etc.

Terrorke
06-12-2006, 02:18 AM
I think access automatically starts with 1.

Maybe you can do something like ID - 1?

myself1
06-12-2006, 02:56 AM
Thanks for the response.

I've frmatted the Autonumber so it reads BR 0001, then BR 0002, so it does increment one number each time.

The problem is in ASP, the BR 000 does not display, only the +ive nubers display, eg 1, 2 etc...

I would like the whole BR 001 to show.

???

russell
06-12-2006, 11:16 AM
Response.Write "BR " & Right("0000" & id, 4)