Access 2007 Custom Autonumber

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

travelchick

Thread Starter
Joined
Jan 6, 2011
Messages
4
This forum seems great, so I'm hoping someone can help me. I need to create a field that has the year and then an auto-number. Like 2011-135. However, there's a catch. There are already records in my DB that I don't want changed. (Last year, people manually entered 2010-##.) So, how can I: a) create this field, and b) make it start with only new records entered?

thanks!
 

OBP

Joined
Mar 8, 2005
Messages
19,895
So what is the name of the Table and the name of the Field that has this number?
 

travelchick

Thread Starter
Joined
Jan 6, 2011
Messages
4
Okay, I'm back. I was out a couple of days.

The table is "Investigations" and the field that has the autonumber is called "AutoID". That is a hidden field. I've also got another field I was allowing users to enter a number manually in the formate YYYY-###. That is called "Case#".
 

OBP

Joined
Mar 8, 2005
Messages
19,895
Shouldn't you copy the contents of Case# in to AutoID before setting up the VBA code?
 

travelchick

Thread Starter
Joined
Jan 6, 2011
Messages
4
That would be ideal, but I didn't know that you could copy info into an autonumber field.
 

OBP

Joined
Mar 8, 2005
Messages
19,895
The new field that will hold the VBA Generated and Incremented number can't be an Autonumber field, it has to be text.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top