How Do You Change An Entry

  • Thread starter Thread starter Minitman
  • Start date Start date
M

Minitman

Greetings,

I am new at Access and am trying to go though the Video Professor's
course. I made a mistake that now is causing a problem. Somehow, I
skipped an entry and left number 5 blank. To correct the mistake I
deleted number 5. now the records show numbers 1-4 and 6-19. The
lessons don't reflect this gap. Is there anyway to change, move or
somehow reassign the ID numbers?

Any help would be most appreciated!!!

TIA

-Minitman
 
You could try change the field from autonumber to numeric long. This would
allow you to change the numbers. However, I don't know if you have related
records in other tables or if you have referential integrity set on.
 
If you don't have records in related tables, open the table in design view.
Copy the name of the ID field. Click in the gray block to the left of the ID
field to highlight the row. Press Delete. Click on Insert and insert a row.
Paste the name of the ID field back in. Set the data type to autonumber.
 
Hey Duane,

Thanks for the reply. A couple questions do however present
themselves

How would I find out if the referential integrity is on and how do I
turn it off?

Also, how can I change the primary key? I keep trying but i keep
getting an error message saying that I need to delete the
relationships first - I have removed the tables from the relationship
view but it still wont let me change the primary key!

Any ideas?

-Minitman
 
Hey PC,

Unfortunately they are related and I can't seem to get them unrelated.
I went the Relationships screen and removed the tables there (to be
replaced later), but I still cannot change the primary key in the
inventory table. If I could change it, I could renumber the Tape ID
Numbers to correct the problem. And then redo the relationships.

But alas, after having removed the relationships, Access still has
them listed as being there somewhere.

Any ideas?

-Minitman
 
Removing the tables from the relationship screen does not undo the
relationships as you have found out. That merely removes them from being
displayed there. Add the table back into the relationship screen and you
should see the relationships. Click on the relationship line from the ID
field and it should become highlighted. Press Delete to delete the
relationship. Now follow my previous instructions. VERY IMPORTANT! As you
noted, you will them have to go to the related table and change the values
of the foreign key there.

Steve
PC Datasheet
 
Greetings,

I am new at Access and am trying to go though the Video Professor's
course. I made a mistake that now is causing a problem. Somehow, I
skipped an entry and left number 5 blank. To correct the mistake I
deleted number 5. now the records show numbers 1-4 and 6-19. The
lessons don't reflect this gap. Is there anyway to change, move or
somehow reassign the ID numbers?

If you're using Autonumbers, bear in mind: An Autonumber has one
purpose and one purpose ONLY: to provide a unique key.

Autonumbers are *not* guaranteed to be sequential or gap free; they
can even become random, for instance if you Replicate your database.
They are *not* "record numbers", and if you can't tolerate gaps in the
sequence, you should simply not use an Autonumber datatype. Use a Long
INteger instead and maintain its sequentiality yourself, manually or
using VBA code.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Hey John,

That is good to know, The Video Professor does not cover that
relevant fact. Thanks

-Minitman
 
Back
Top