If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Out of Sync Autonumber
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 |
#2
|
|||
|
|||
Out of Sync Autonumber
On Wed, 30 Jun 2004 07:00:09 -0700, "Linda"
wrote: 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. John W. Vinson[MVP] Come for live chats every Tuesday and Thursday http://go.compuserve.com/msdevapps?loc=us&access=public |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
autonumber | Deepak | General Discussion | 3 | June 18th, 2004 09:07 PM |
Outlook 2003 with Win 2000 Prof and F9 offline sync | Ed Luhrs | General Discussion | 0 | June 14th, 2004 11:10 PM |
Autonumber -Reset to a lower number | Mike | General Discussion | 2 | June 5th, 2004 01:54 AM |
Autonumber foreign keys and subforms | Ed Havelaar | Database Design | 3 | May 12th, 2004 07:34 AM |
reset autonumber value in table | Database Design | 0 | April 29th, 2004 02:11 PM |