Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding table to qry disables adding new record?

Status
Not open for further replies.

jetspin

Programmer
Mar 5, 2002
76
Hi.

I have a continuous form that is okay. I can add records to it, BUT as soon as I add a joined table to the form's qry, I cannot add any records on the continous form? The new record navigator is disabled and there is a blank rec as the last of the continuous forms but it does not accept any data entry.

Here are my tables and the qry for the form before and after.

tblINVitems
itmItmID AutoNumber Prime Key
itmIctID Number FK to tblINVItemCategories
itmName Text
itmSerialNumber Text
itmDesc Text

tblINVItemCategories
tctIctID AutoNumber Prime Key
tctName Text
tctDesc Text

tctIctID is one to many itmItmID

The form source qry that works....

SELECT tbINVItems.itmItmID,
tbINVItems.itmName, tbINVItems.itmDesc,
tbINVItems.itmSerialNumber
FROM tbINVItems
ORDER BY tbINVItems.itmName;

Here is the form source query that causes the problem as soon as I put the joined table in the query.

SELECT tbINVItems.itmItmID,
tbINVItems.itmName,
tbINVItems.itmDesc,
tbINVItems.itmSerialNumber
FROM tblINVItemCategories INNER JOIN tbINVItems ON tblINVItemCategories.ictIctID = tbINVItems.itmIctID
ORDER BY tbINVItems.itmName;

I recreated the table several times...with no luck...
I deleted all recs too.


Jetspin2
 
Hi.

I solved it and apologize. I tried everything but this!!!!!
I had not noticed the bottom status was 'Cannot add record(s), join key of tblINVItems not in record set. When I added
itmIctID to select part of the qry like this it worked.

SELECT tbINVItems.itmItmID,
tbINVItems.itmName,
tbINVItems.itmDesc,
tbINVItems.itmSerialNumber,
tblINVItemCategories.ictName,
tblINVItemCategories.ictIctID,
tbINVItems.itmIctID
FROM tblINVItemCategories INNER JOIN tbINVItems ON tblINVItemCategories.ictIctID = tbINVItems.itmIctID
ORDER BY tbINVItems.itmName;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top