Should be a simple question

  • Thread starter Thread starter Mick34
  • Start date Start date
M

Mick34

Hey,

I am as green to Access as you can be. I'm going through some tutorials on
creating recodrs in a table and noticed something. Not sure why it occurs,
but the tutorial does not mention anything about it.

When I 'tab' through the fields of the first record, the record ID
increments by 1. So when I hit the 4th firled the ID has gone from 1 to 4.

Before going any further with the tutuorial, I wanted to know why this would
be happening, or should it even be happening.

BTW, it's Access 2007

Thanks in advance
 
That would be an autonumber that is set up automatically as an ID field when
you create a table in datasheet view in Access 2007. It is supposed to do
that, but don't be misled. It will not always necessarily go in sequence.
If you start a record and then cancel it, your number is lost. If you delete
a record, that number is lost.

Autonumbers are only guaranteed to give you a UNIQUE number and not
necessarily incrementing. So, it is best to use them behind the scenes as ID
fields for the Primary Keys of tables (of which you store that ID number in
the other tables as a long integer - foreign key).
--
Bob Larson
Access MVP
Access World Forums Administrator
Utter Access VIP

Tutorials at http://www.btabdevelopment.com

__________________________________
 
Hi Bob,

The "feature" that Mick describes is indeed unique to Access 2007. Mick is
tabbing within the *same* record. I think this is somehow related to how one
can add a field to a table, without first opening the table in design view.

The ID field is increment by one every time that you add a
field to a new table in Datasheet view in Access 2007

http://support.microsoft.com/kb/924741


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
Much appreciated guys.

This was the 1st time I've been able to get back to my attempts at learning
Access. I thank you both for your input, and it seems that Tom's link is spot
on. I thought I was going crazy. Glad to see tha it wasn't something I was
doing, but an issue with 2007.

So, how many other views are there in Access to create Dbs? Is this just a
problem with Datasheet View
 
Hi Mick,
So, how many other views are there in Access to create Dbs? Is this just a
problem with Datasheet View

As far as I know, this autonumber thing is only a problem with Access 2007,
and only in datasheet view. Personally, I don't think that allowing one to
create new fields on-the-fly, by simply typing data, is a good thing. Take a
quick look at a four-page paper written by database design expert Michael
Hernandez.

Database Design Tips by Michael Hernandez

You can access this document at this link:
http://www.accessmvp.com/JConrad/accessjunkie/resources.html#DatabaseDesign101

Michael is quoted as follows:

"Always design the database on paper first. This one tip will probably save
you an enormous amount of time."

The add-a-new-field-on-the-fly feature is the DEnormalization wizard, in my
opinion. Always design on paper first.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
Back
Top