A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Out of Sync Autonumber



 
 
Thread Tools Display Modes
  #1  
Old June 30th, 2004, 03:00 PM
Linda
external usenet poster
 
Posts: n/a
Default 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  
Old June 30th, 2004, 06:55 PM
John Vinson
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 01:33 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.