autonumber problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a database that I'm having problems with the record number. I have a
auto number field that I call DHID. When I type new information in the form
my DHID is number 10 and the record number on the bottom is also 10. When I
close out of the program and reopen it. My DHID number that was 10 is still
10which is good, but my record number on the bottom changes to 1 so when I go
to look at my first record I entered on the form it is now record 10 but
still DHID 1. Is there a way to fix the record number and how? It seems to
happen after a 24 hour period. I'm new to access and I'm using access 2003.
Thanks for the help in advance.
 
I have a database that I'm having problems with the record number. I have a
auto number field that I call DHID. When I type new information in the form
my DHID is number 10 and the record number on the bottom is also 10. When I
close out of the program and reopen it. My DHID number that was 10 is still
10which is good, but my record number on the bottom changes to 1 so when I go
to look at my first record I entered on the form it is now record 10 but
still DHID 1. Is there a way to fix the record number and how? It seems to
happen after a 24 hour period. I'm new to access and I'm using access 2003.
Thanks for the help in advance.

Your DHID and the record number are unrelated. The record number merely
shows which record (from top to bottom in the list) you are on - it
isn't a record ID that stays with each record.

If your DHID is correct, don't worry about it. If you want to see your
records in a different order, change the Order By property in your Form
and turn on Allow Filters.
 
I have a database that I'm having problems with the record number. I have a
auto number field that I call DHID. When I type new information in the form
my DHID is number 10 and the record number on the bottom is also 10. When I
close out of the program and reopen it. My DHID number that was 10 is still
10which is good, but my record number on the bottom changes to 1 so when I go
to look at my first record I entered on the form it is now record 10 but
still DHID 1. Is there a way to fix the record number and how? It seems to
happen after a 24 hour period. I'm new to access and I'm using access 2003.
Thanks for the help in advance.

You're misunderstanding the function of your Autonumber, or of the
record number on the bottom, or both.

They have NOTHING to do with one another.

The record number on the navigation box at the bottom of the form
refers to the number of the record for THIS form, at THIS moment. That
number is not permanently attached to your data; it will change if you
filter the form, change the sort order, or add or delete records in
your table. It's just a display to tell you where you are in the
recordset; it has no permanent significance.

An Autonumber is NOTHING other than a unique, meaningless key. It is
*not* a count, it is *not* guaranteed to be squenetial, and it *will*
have gaps in the numbering system. If you use it in this spirit it's
perfectly acceptable; if you are expecting it to match the record
count on the Form, or to be gapless, or to always be sorted in
numerical order, you'll be disappointed!

John W. Vinson[MVP]
 
An Autonumber is NOTHING other than a unique, meaningless key. It
is *not* a count, it is *not* guaranteed to be squenetial, and it
*will* have gaps in the numbering system. If you use it in this
spirit it's perfectly acceptable; if you are expecting it to match
the record count on the Form, or to be gapless, or to always be
sorted in numerical order, you'll be disappointed!

Because of this, there's never any reason to actually display the
Autonumber field on a form, as the data is only meaningful behind
the scenes. A human being will never be able to do anything useful
with that value, so why show it to them?
 
As somebody (Rick Brandt, I think) pointed out, in some limited cases such
as the reference number assigned to a particular call in a calls database,
autonumber probably makes as much sense as anything, and has the advantage
of not needing error handling to guard against duplicate values in a
multi-user environment. It doesn't affect the answers in this post advising
against using autonumber, but I will suggest that "never" may be a bit
strong.
 
As somebody (Rick Brandt, I think) pointed out, in some limited cases such
as the reference number assigned to a particular call in a calls database,
autonumber probably makes as much sense as anything, and has the advantage
of not needing error handling to guard against duplicate values in a
multi-user environment. It doesn't affect the answers in this post advising
against using autonumber, but I will suggest that "never" may be a bit
strong.

I agree. In certain instances we make it visible to the user and call
is something like "Reference Number". We tell them it's like a serial
number - it's a unique, never-changing way to refer to that record.
 
I agree. In certain instances we make it visible to the user and
call is something like "Reference Number". We tell them it's like
a serial number - it's a unique, never-changing way to refer to
that record.

There has to be a strong reason for revealing it to the user, yes.

You shouldn't be putting it on every form as a matter of course,
though.
 

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

Back
Top