Access 2000 & Autonumbers

  interzone55 19:47 08 Feb 2005

I want to sent up a database to track repairs. The current database is written using the rather archaic Lotus Approach 97, which nobody at work knows how to work anymore, so the job has fallen to me to create a new database.

The present system logs each repair with a unique number SP50000, SP50001 etc...

This seems like an ideal job for an autonumber field, but Access will only allow this to be a number, not 2 letters and a number.

Anyone any idea how to accomplish this?

  Muckle 20:10 08 Feb 2005

I think you need to use an input mask - type it into Access help and see what comes up!

  Chris the Ancient 20:15 08 Feb 2005

It is possible. Just!

I checked in my book an Access, and it means doing some visual basic coding for the table so that the auto-increment function can be used.

You can also start an autonumbered table at any number you want (shown in the Help).

Based on that, you could possibly produce a form or report that uses text string manipulation to produce a synthetic unique numbering system.

But no easy solution that I can find.


  interzone55 22:14 08 Feb 2005

That's what I was worried about, I know next to nothing about VB.

Looks like we will have to just have a numbered system.

Thanks for checking for me

  Muckle 22:50 08 Feb 2005

If the first 2 initials are always the same eg SP in your example and there are always the same number of digits, you can set the field as Autonumber and then use the following in Format: "SP"0000.
Let me know if this is suitable or if there is something I have missed.

  interzone55 21:30 18 Feb 2005

Sorry it's took me so long to get back, more pressing matters at work stopped me from checking this out.

You're spot on Muckle, just set the format to be "SP"00000 and it works.


  Chris the Ancient 22:10 18 Feb 2005

Glad you got that sorted!

Me, being me, went straight into the deep end (possibly suspecting that you might want something more complicated) and came up with a pile driver to crack a peanut!

Glad that Muckle gave you a more sensible solution (and one that I will remember in future!).

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

OnePlus 5T review: Hands-on

Illustrator Andrés Lozano on his improv line work, brazen use of colours & hand sketching

iPhone X review

Comment envoyer gratuitement des gros fichiers ?