View Single Post
  #21  
Old November 11th, 2008, 05:26 PM posted to microsoft.public.access.gettingstarted
Ken Sheridan
external usenet poster
 
Posts: 3,433
Default Multiple Records

It could be the indexing in the Capacities table is wrong. The primary key
should be a composite one on all three columns, PersonnelID, CompanyName and
Capacity. In table design view you select all there fields together and then
right click and select Primary Key from the shortcut menu. The key symbol
should thenshow against all three fields. The PersonnelID and CompanyName
fields, as foreign keys, should each be indexed non-uniquely. This will show
in the properties sheet of each field in table design view as 'duplicates
allowed' in the index property.

Its theoretically possible that there could be other indexes set, which you
can check by selecting View | Indexes from the menu bar while in table design
view. If any of the fields are individually indexed uniquely then this would
prevent any rows being inserted into another row if the same value already
exists in the field; if a PersonnelID value has already been entered for
somebody as a director or shareholder for instance, and the PersonnelID is
indexed uniquely (no duplicates) then it would prevent the same person being
added as an officer.

I'm dubious about this being the problem, however, as it would very
coincidental if all officers had already been entered as directors or
shareholders. I'd be more inclined to suspect the data as the first culprit.
Are you sure that the officers are showing correctly as such in the source
tblMyExcelStuff table? If so have they been appended correctly to the
Personnel table? They'll just show as names in personnel of course, so you
really need to lock for people who are officers but not also shareholders or
directors to be sure they've all been appended correctly.

Ken Sheridan
Stafford, England

"pupkiss1965" wrote:

Okay, I am going to pull my hair out...I have checked everything I can
regarding the append query for my Officers and I get the same error as I
previously mentioned. I run it and it populates the query but it won't let
me append to the Capacities Table....I have checked the format, the spelling
on both the tblMyExcelStuff and even compared and rewrote the code but still
nothing...why is it that the other 2 went through and are in the Capacities
table but this one is going to drive me nuts? Any suggestions?