single form reading from multiple tables, continued...

Koggala

New Member
Joined
Jul 4, 2003
Messages
39
I have posted this problem before but not to a successfull conclusion. I know that i am to create a query from the two tables 1st, then create the form to read directly from the query, but, i still get the error message saying "cannot add record, join key of table "projectnumber" not in recordset".

Has anyone got any ideas, should i start the creation of the DB again from scratch, i don't know what to do? :confused:

Help!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Can you give an idea of the structure of your tables and which columns are the primary and foreign keys?
 
Upvote 0
I have exactly this problem and am having a fun time figuring it out. The database is managing employee resources and programming tasks known as "defects." My table structure is like this (italicized fields are linked fields bolded fields are primary keys):

Defects
DefectID
SubProject
Description
etc...


Allocations
AllocationID
DefectID
ResourceID
Hours
etc...

Resources
ResourceID
FirstName
LastName
etc...


The error I keep getting is "Cannot add record(s); Join Key of table 'Allocations' not in recordset."

Ideally, I have been trying to create a form wherein the main form would contain the Defect information and the tabular sub-form would consist of fields from 'Allocations' and 'Resources' alike (e.g.: 'FirstName', 'LastName', 'Hours', etc...)

:oops: :oops: :oops:

Any help would be appreciated!
 
Upvote 0
I think what is happening is that your query does not contain the primary key for Allocations and/or Resources, so when you try to add a new record to the subform, it cannot create it because it cannot create the appropriate primary keys.

Add the AllocationID/ResourceID to your query, they will then be available in the field list in your form's design view. Add them to your form - and if you don't want to see them, just make them invisible in the properties.

Hope this helps,

MBN
 
Upvote 0

Forum statistics

Threads
1,221,687
Messages
6,161,287
Members
451,695
Latest member
Doug Mize 1024

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top