ID numbers

J

jones

I have six tables with autonumber key fields, that I have linked together. No
I need to add new record. How do I make it so tjat each table have the same
autonumber value. I am using form, but I need to make it also in tables.
 
R

Rick Brandt

jones said:
I have six tables with autonumber key fields, that I have linked together. No
I need to add new record. How do I make it so tjat each table have the same
autonumber value. I am using form, but I need to make it also in tables.

When you make relationships between tables only one of the fields can be an
AutoNumber. The others need to be Long Integers.
 
J

Jeff Boyce

You've described what you've done, but not why. How is it that you have six
different tables that should all have the same row ID? I'm basing that
supposition on the fact that you've reported trying to link them all
together by "the same" ID value.

By the way, Microsoft Access creates unique, arbitrary row identifiers
called Autonumbers FOR EACH TABLE. There is NO relationship between
AutonumberID=1 on table1 and AutonumberID=1 on table2...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

jones

The six tables are about the same material. I have Basic_Data, Purchasing,
Accounting and so on. It is not an actual ID, but becouse the materials do
not have an individual numbers or codes, I need to use some way to link them
together.

"Jeff Boyce" kirjoitti:
 
R

Rick Brandt

jones said:
The six tables are about the same material. I have Basic_Data, Purchasing,
Accounting and so on. It is not an actual ID, but becouse the materials do
not have an individual numbers or codes, I need to use some way to link them
together.

Then you make one table the "base" table and use an AutoNumber in that. This
will be the Primary Key for that table. The other tables will also have
AutoNumber fields that are the Primary Key for each of them respectively and
each will have an additional LongInteger field that will be used to link to the
base table.
 
J

jones

...becouse the material is an Item that could be used in many equipmet (that
part is okay) and on the other hand, it could have many storages, different
accounts and so on. When a new item is added, it should have an individual
record in each table, and these have to be linked together.
I can use Autonumber field in Basicdata and link them to LongInteger -field
in those others. But how is this done? I suppose that a form could have a
button to insert a new Item, and some code to add and update the records.


"Jeff Boyce" kirjoitti:
 
J

Jeff Boyce

Sorry, I'm still not visualizing the data/domain you are working with. It
is very unusual to use one-to-one relationships, except for security
purposes, or for the rare sub-typing situation. If you'll provide an
example from your situation, with "real" data, it might be clearer...

Thanks

Jeff Boyce
Microsoft Office/Access 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