Adding auto-numbered Primary Key to imported tables.

  • Thread starter Thread starter vikenk
  • Start date Start date
V

vikenk

Hello,

I'm working on a project with a friend. He has an old dBase III
database he wants to convert to Access. It's mostly names and addresses
for a mailing list for a newsletter. Importing the table was no
problem. My problem is that I'd like to assign an Auto-Numbered Primary
Key to the table, but Access 2003 won't let me.

How can I import the data and provide an auto-numbered Primary Key as
well? Access won't let me use an auto-numbered key.

I've tried to create a new table with a primary key then tried to
import the data into the table, hoping that it would automatically auto
number it, but it only imports the table as a whole, not just the data
within the table.

For some background: I've created databases before (mostly mailing
lists with sorting filters, etc) and my knowledge of Access falls
somewhere between beginner and intermediate (closer to intermediate),
but I have no SQL or VBScript knowledge.

Any ideas?
 
Once you have imported your table go to design view, add field [ID] data type
auto number. Save the table. Then select that field again in design mode
and make it a primary key, then save the table.
 
Once you have imported your table go to design view, add field [ID] data type
auto number. Save the table. Then select that field again in design mode
and make it a primary key, then save the table.
 
Jeff said:
Once you have imported your table go to design view, add field [ID] data type
auto number. Save the table. Then select that field again in design mode
and make it a primary key, then save the table.

Jeff,

Thank you very much. It worked like a charm! :>) Still though, I
wonder why Access didn't allow me to do it before...
 
Jeff said:
Once you have imported your table go to design view, add field [ID] data type
auto number. Save the table. Then select that field again in design mode
and make it a primary key, then save the table.

Jeff,

Thank you very much. It worked like a charm! :>) Still though, I
wonder why Access didn't allow me to do it before...
 
Creating an autonumber field is unique. When you create an autonumber field
it automatically numbers each record as soon as you save it. Making the
field a primary key is yet another action requiriing the program to verify
the uniqueness if each record. Access just requires the step by step process.


--
Jeff C
Live Well .. Be Happy In All You Do


Jeff said:
Once you have imported your table go to design view, add field [ID] data type
auto number. Save the table. Then select that field again in design mode
and make it a primary key, then save the table.

Jeff,

Thank you very much. It worked like a charm! :>) Still though, I
wonder why Access didn't allow me to do it before...
 

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

Similar Threads


Back
Top