Help with queries

  • Thread starter Thread starter Alain
  • Start date Start date
A

Alain

Hi to all,

I would like to understand why I cannot add any records bases on a query
that have 2 or more tables in it
The message I get is "Cannot add any records, join key of table tblProperty
not in recordset.

My tables are design correctly, I think, the minute I add a table to my main
table then I cannot do anything
Here is the query code based on 2 table.

SELECT tblProperty.AreaRecreationalSM, tblProperty.AreaLandAcre,
tblProperty.AreaOtherAcre
FROM tblProperty INNER JOIN tblPropertyCosts ON tblProperty.IdPropCosts =
tblPropertyCosts.IdPropCosts;

Can anybody tell me what I am doing wrong

Thanks

Alain
 
To have a query be updatable, among other requirements, the primary key of
the table being edited must be in the query that you're using. As the error
message tells you, your query is not returning the field
tblProperty.IdPropCosts. Add that field to your SELECT clause:

SELECT tblProperty.IdPropCosts, tblProperty.AreaRecreationalSM,
tblProperty.AreaLandAcre,
tblProperty.AreaOtherAcre
FROM tblProperty INNER JOIN tblPropertyCosts ON tblProperty.IdPropCosts =
tblPropertyCosts.IdPropCosts;
 
Back
Top