Import New Table; Set Primary Key As AutoNumber

R

ryguy7272

I've procrastinated long enough; I'm starting to learn Access now. I know a
little actually, but not much. Anyway, I'm practicing with the NWind DB. I
exported each table to an Excel sheet and then tried to import each Excel
sheet to a new DB that I just created. A bit silly, but it's really helping
me to learn. I though I had a handle on it, but when I tried to import the
'Orders' table, it comes in kind of weird. Under Field Name 'OrderID', the
Data Type is Number, but I want it to be AutoNumber so I can create
Relationships. I can't seem to import this Table as AutoNumber and I can't
copy/paste the data from DataType Number to DataType AutoNumber after I
insert a row in Design View. Can someone please explain how to get DataType
AutoNumber to override DataType Number

Regards,
Ryan--
 
J

Jeff Boyce

Autonumbers are not required for relationships. Access Autonumbers are just
one way of coming up with a unique row identifier. If you have another
table that uses LongInt data to point back at a unique row identifier
(primary key) in a "parent" table, I don't believe it will make any
difference if that unique identifier is a LongInt or an Autonumber data
type.

Now, if you want to be able to ADD new records and have a unique identifier
automatically generated, Autonumber can do the job. But that's a different
question...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
R

ryguy7272

There seems to be a problem with the Data Export process. I click on the
Table (Orders) and then File > Export and choose a destination for the file.
When I try to import it from the Excel sheet, I can look at the Column
headings and I see they are slightly different. Also, the data in some of
the columns is VERY different. Instead of names in the Employee column I
have numbers, and in place of the names in the Ship Via column, again I have
numbers!! I guess this is preventing me from linking the tables and
establishing the relationships.

Looks like my Excel experience won't help me one bit in the Access world...
 
R

ryguy7272

I just found something called 'Field Size' under design view. That must be
what you were referring to because I made a few modifications to that
property and then I was able to link all the tables! I just bought two
Access books from Borders yesterday. Well, time to start reading.

Thanks for the tip Jeff.


Regards,
Ryan---
 

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