Incremental field, last record +1, i.e., 2456. 2457, 2458; How?

G

Guest

Need to have a number field that increases 1 each record. Access 2002 will
allow only 1 Autonumber, and since I already have 1000+ records, don't want
to start from scratch. The book mentions Last(), which if it worked, could
be like Date()+5, which works well, but Last() doesn't work in Form or Tables.
I have an employee number, increasing 1 each time but starting at a
four-digit number. I have no missing numbers. Just want it to start filling
it in when I make a new record instead of typing it in. Tried Key ID + ##,
makes sense since that grows 1 each record, but won't let me. Ex: In
Properties, Default Value field, =ID+999, if the very first record was 1000
and grows from there. Any advice on how to number existing records starting
at other-than-1? Appending leaves me with 2 fields occupying the same place
on forms.
 
G

Guest

Build a separate query to use in a form as record source of an unbound
textbox. Set the default for your textbox for the employee number using the
unbound textbox.
 
T

Tim Ferguson

Need to have a number field that increases 1 each record. Access 2002
will allow only 1 Autonumber, and since I already have 1000+ records,
don't want to start from scratch.

If you already have an autonumber field in the table, why do you need
another identifier?

If you don't need to identify the records, but just to number each line
in a query, then you can use a ranking query to put the numbers in.

The default value wouldn't help with this: at the time of creating a new
record (which is when the default values are evaluated) there is no ID
field to add 1 to. You can do this kind of thing in a form control, but
of course that's not robust if people have other kinds of access to the
tables.

It's not a very specific answer, but I am having difficulty imagining
what your problem might be.

B Wishes


Tim F
 

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