Hi Pat,
Thanks once again for your help (I don't think this is the first time you've come to my rescue!) That worked fine. I do actually need fields from tblInventory, but I removed them from the example statement for simplicity's sake, to remove as many factors as possible which weren't affecting the problem. I've now added the extra fields in which I need.
Originally my joins were unenforced, but in this example I've included a primary key field in the join, and thus made it a one-to-many join. This would seem to imply that KevinM's original post had some merit, but as I mentioned I have a three-table query in which all tables are joined by unenforced joins, but this works perfectly, so I discounted this. What criteria could my three-table query be following to allow it to be updateable? I can post the db if this will help. Is "you must make explicit joins between tables in order for the query to be updatable" the golden rule, or are there other factors which control this? The SQL statement is:
SELECT tblInventory.EE_No, tblProjectBookings.CurrentlyAllocated, tblProjectBookings.SuperInitials, tblSupervisors.SuperLastName, tblSupervisors.SuperFirstName
FROM tblSupervisors RIGHT JOIN (tblInventory LEFT JOIN tblProjectBookings ON tblInventory.InventoryID = tblProjectBookings.InventoryID) ON tblSupervisors.SuperInitials = tblProjectBookings.SuperInitials
WHERE (((tblProjectBookings.CurrentlyAllocated)=False))
ORDER BY tblInventory.EE_No;
Hmm, maybe it's easier to post a sample db?
Thanks again for your help Pat, it's fixed my problem but I'd like to be certain I can avoid it next time around.
The only other issue I faced I've been able to get around (relational databases seem incredibly involved, which is why I'd like to know the 'golden rules' if there are any). The field EE_No is the asset number of our equipment, and the field tblInventoryID is the primary key in the inventory table. Not every piece of equipment has an asset number, so I can't use it as the primary key, so I've chosen an autonumber field which isn't used for anything else apart from being a unique primary key and ensuring the integrity of the database. But since this number isn't used for anything, no-one will ever see it or know what it is, but to be able to complete a new entry, you have to type in what this inventoryID is, as it's the field required for the join. There will only ever be one inventoryID for one EE_No, and vice versa, and the user will know and enter the EE_No, so the entry of the EE_No should be able to be translated to the inventoryID. But such is not the case - to be able to complete entry of a record, I have to explicity enter the inventoryID, even after the EE_No has been entered in the same record.
The fix was: tblInventory.EE_No is in the same table as tblInventory.InventoryID, which is the primary key for tblInventory (the 'one' part of the join). tblLicenseIssue.EE_No is in the same table as tblLicenseIssue.InventoryID (the 'many' part of the join). Originally I included tblLicenseIssue.EE_No in the query (same table as has the 'many' part of the join), but once I removed this and replaced it with tblInventory.EE_No (same table as the 'one' part of the join), the inventoryID fields are automatically populated with their correct values.
Hope this helps someone out there, but two questions remain:
1) what are the 'golden rules' for linking tables?
2) why did my three-table scenario work?
Greg