field properties on imported tables

  • Thread starter Thread starter cporter
  • Start date Start date
C

cporter

I have several tables I've imported from dBaseIV. One of the fields is
my primary key and I'd like to set this as an auto number field but
can't since there is already data in the table. Is there a work around
where I can keep my numbers already generated and get Access to fill in
from there?
 
Rename the table to a temp name. Copy the table structure to your table
name. Modify to make the field autonumber. Append.
 
Are you intending to use the new Autonumber field solely as a unique row
identifier? This is the purpose for which this data type was created.

Are you intending to use the new field as a "human-visible" field? If so,
this is not what it was intended for, and you will end up with "gaps" in the
sequence.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
The field in question is the workorder number and is currently the
primary key in our dBase IV system. As such it is both unique and human
visible. Gaps from deleted workorders are acceptable.
 
Perhaps we have differing definitions of "autonumber". If you already have
a field you are using as a Primary Key from dBase data, you'll need to know
the data type and use a compatible data type in the Access table you are
appending the records to.

I believe Karl's suggestion offered an approach...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
I want to make it autonumber as in select autonumber in the field
properties of Access. I get an error message when I try this. It says
you can't change the data type of a field once you have entered data
into it. The tables I have are imported from dBaseIV and already
populated. In dBaseIV the workorder number/primary key is generated by
a combination of SQL and dBase programming code. So is there an easy
way, query or built in function, I can use to get the new table to
autonumber from the last workorder number used, 25167, or do I have to
figure out some VBA code to do this?
 
Please re-read Karl's suggestion. No VBA required.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Sorry, I came intothis forum through Google groups and didn't see
Karl's reply. Thanks for your help.
 
Back
Top