Out of Sync Autonumber

  • Thread starter Thread starter Linda
  • Start date Start date
L

Linda

I have several tables that use Autonumber as the PK

ContractNum Table
Autonumber PK
ContractNum
ContractTitle
ContractComments

VendorNameTable
Autonumber PK
CompanyName
CompanyAddress
CompanyCity

VendorFeeTable
VendorID PK
FeeNum PK
FeeAmount
FeeAddAmount

FeeNumTable
FeeNum PK
FeePhrase
FeeDiscription

when I delete a contractnum or Vendor
the next new contractnum or new vendor
is out of sync and retreives information
from another contractnum or vendor

The relationship is 1:Many for Contractnum & Vendor
and 1:Many for FeeAmount & FeeNum tables

The VendorFeeTable is the junction to the Many:Many
 
when I delete a contractnum or Vendor
the next new contractnum or new vendor
is out of sync and retreives information
from another contractnum or vendor

The relationship is 1:Many for Contractnum & Vendor
and 1:Many for FeeAmount & FeeNum tables

The VendorFeeTable is the junction to the Many:Many

You're misunderstanding how autonumbers work. An Autonumber should
NEVER be used as a foreign key (a linking field in a related table);
*only* as a primary key. If you have an autonumber VendorID in
Vendors, your related tables (VendorFeeTable) should have a Long
Integer VendorID, *NOT* an autonumber. It would be filled in using a
form/subform arrangement.
 
Back
Top