Creating unique Keys – Possible from table default?

N

Nevie and Phil

Creating unique Keys – Possible from table default?

I am trying to create unique keys for my tables, because I am taking 35
databases (of the same source) and combining them frequently.

I want to give each table a key that is a combination of an auto number and
their group number.

Is there a way I can do this from the table design default? I tried to
create a function and have it return the value, but it doesn’t recognize my
function when I try to call it from the table design and it didn’t like me
trying to call its own auto number field.

If you guys have any advice, I would appreciate it, thanks!
 
J

John Vinson

Creating unique Keys – Possible from table default?

I am trying to create unique keys for my tables, because I am taking 35
databases (of the same source) and combining them frequently.

ummm... 35 different "mdb files"!!!? How is this coming about?
I want to give each table a key that is a combination of an auto number and
their group number.

An Autonumber is ALREADY unique. You can't make it any uniquer by
adding another field. Or are you Appending an autonumber value from
these 35 tables into a Long Integer field in your combined table?
Is there a way I can do this from the table design default? I tried to
create a function and have it return the value, but it doesn’t recognize my
function when I try to call it from the table design and it didn’t like me
trying to call its own auto number field.

If you guys have any advice, I would appreciate it, thanks!

I'd suggest setting up an empty template database, and importing into
a new copy of that template as needed. This will be a lot better than
trusting the import wizard to get the field types, indexes, etc. etc.
right every time!

John W. Vinson[MVP]
 

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