How to auto increment integer entries without autonumber in 2007

A

Arog

In MS Access 2000, I could manully enter an integer value in a row of the
datasheet view, and manually enter the next larger integer in the next row
below, and then continue incrementing the values going down the sheet by
holding down the down arrow key as long as necessary to fill the remaining
empty rows (for that column). Each successive row would increment by 1 as
long as there was no value present. This repated entry behavior would stop as
soon as it reached a row that already contained a value. I don't find that
behavior in MS Access 2007. Is there a property I can change to restore this
behavior in 2007? The field is not and cannot be an autonumber data type.
 
D

Douglas J. Steele

What you're describing was commonly viewed as a bug in Access by most of us
and it was corrected in Access 2007.

You can achieve that result by putting code in the form's BeforeUpdate event
to look up the current high value and increment it.
 
P

Petr Danes

Hi Arog,

you may also be interested in something I posted a few years back, in the
archives with the subject line of

"General solution for missing sequence numbers"

It generated a bit of discussion about why I needed the routine, which got a
ways off track at one point, but it is a fairly generic piece of code that
handles a variety of sequential numbering needs. Help yourself, if you think
it may work for you.

Petr
 
A

Arog

I suspected that it was considered a bug. I used it as a helpful feature for
selecting custom groupings of records. Definitely not what the development
team had in mind, but found it quire useful.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top