Update data on a query based Form (1 Viewer)

kzmbj0

New member
Local time
Today, 18:18
Joined
Feb 12, 2008
Messages
2
I have been working on a form which is based on a query which joins a few tables. It has been working as expected including having the ability to modify the underlying data using the form.

I have made a change to the query by joining another query to it which allows the addition of a single new calculated field. The new query works correctly and displays the correct data, however I am now unable to modify the underlying data as I was before.

I have checked that it is not a fault of the form as I can open up the query directly and cannot modify the underlying data, however if I remove the join to the second query i am able to modify the data again.

A very abridged version of my query follows:

SELECT tblMembers.M_Code,
tblMembers.M_Surname,
tblEquipment.STRAP,
tblEquipment.OTHER,
qryLOA.LOA
etc. etc.
FROM (((tblMembers
LEFT JOIN tblMember_Cats ON tblMembers.M_Member_Type = tblMember_Cats.Ca_ID)
LEFT JOIN tblEquipment ON tblMembers.M_Code = tblEquipment.MEMBERSHIP_CODE
LEFT JOIN qryLOA ON tblMembers.M_Code = qryLOA.M_Code)
WHERE (((tblMembers.M_Date_Left) Is Null))

Can anyone explain why joining to the second query prevents my ability to modify the data in the query? I can understand that the calculated data in the subquery could not be modified, but why not the other fields?
I would really appreciate some assistance on this one.

I suspect including the second query as a subquery within the first query may help, however it is complex with groupings and sums and I am unsure how I might do it - or even if it is the problem.
 

Attachments

  • member_query.JPG
    member_query.JPG
    87.4 KB · Views: 478
Last edited:

kzmbj0

New member
Local time
Today, 18:18
Joined
Feb 12, 2008
Messages
2
Thanks Bob. You pointed me the right way, and I then read your section on "Surviving subqueries" and ended up using a DLookup instead of my joined query/subquery.
It worked great.
 

mchung77

New member
Local time
Today, 01:48
Joined
Dec 14, 2012
Messages
1
Hi,

I am hoping you guys can help me. I have a query with just bunch joins, but i am not able to edit data when the form is created. Here is my query,

SELECT Topic.TopicID, Topic.Topic, Topic.TopicLink, Topic.Comments, Employee.EmpName, Employee.EmpEmail, Employee.EmpPhoneNumber, Employee_1.EmpName, Employee_1.EmpEmail, Employee_1.EmpPhoneNumber, Employee_2.EmpName, Employee_2.EmpEmail, Employee_2.EmpPhoneNumber, Employee_3.EmpName, Employee_3.EmpEmail, Employee_3.EmpPhoneNumber, Document.PRO_BPI_LWI, Course.CourseName
FROM (Course RIGHT JOIN ((Title AS Title_2 INNER JOIN ((Title AS Title_3 RIGHT JOIN Employee AS Employee_3 ON Title_3.TitleID=Employee_3.TitleID) RIGHT JOIN (Title AS Title_1 INNER JOIN (Employee AS Employee_2 INNER JOIN (Employee AS Employee_1 INNER JOIN (Title INNER JOIN (Employee INNER JOIN Topic ON Employee.BemsID=Topic.SMEBemisID) ON Title.TitleID=Employee.TitleID) ON Employee_1.BemsID=Topic.AMSPrimaryID) ON Employee_2.BemsID=Topic.AMSBackupID) ON Title_1.TitleID=Employee_1.TitleID) ON Employee_3.BemsID=Employee.ReportsTo) ON Title_2.TitleID=Employee_2.TitleID) INNER JOIN TopicCourse ON Topic.TopicID=TopicCourse.TopicID) ON Course.CourseID=TopicCourse.CourseID) INNER JOIN Document ON Topic.TopicID=Document.TopicID;

Any idea to overcome this? Basically I need to create a form that can edit the data based on this query and change out the data in the table.
 

Users who are viewing this thread

Top Bottom