My problem takes quite long to explain properly, so let me start with a general explanation. If more information is needed to help clarify where things go wrong, I'm happy to oblige.
There are three tables that play a part in the issue:
So far, so good. I get the records I expect to see. The problem starts when I edit a record. The form that holds the list of assignments cannot be altered, all the fields are disabled. A third form holds every field from tblAssignment and that's where users can edit data. It is bound directly to tblAssignment.
I use a form refresh on the 'list form' after data is edited on the 'details form'. Until recently, when the 'list form' merely showed all the assignments without the comboboxes to zoom in, the 'list form' got updated right away. It showed updated information as soon as the data were changed on the 'details form'. But now that I use SQL strings to only show the assignments of one office, or one person, the 'list form' is no longer updated. I need to press F5 before the changes appear.
I am desparately trying to avoid having to use a requery. I'm not fond of having to jump through the form. So the big question is; why does a refresh no longer work, yet pressing F5 does?
There are three tables that play a part in the issue:
- tblAssignment - Holds assignments for all the employees
- tblAssignmentColleague - Has an N-1 relation with above table, so several people can be related to one assignment
- tblColleague - Has a 1-N relation with above table and holds a field OfficeId
Code:
"SELECT qryAssignment.AId, Subject, Client, OfficeId <and then some>
FROM (qryAssignment
INNER JOIN tblAssignmentColleague ON qryAssignment.AId = tblAssignmentColleague.AId)
INNER JOIN tblColleague ON tblAssignmentColleague.PId = tblColleague.CId
WHERE OfficeId = " & cboOffice
I use a form refresh on the 'list form' after data is edited on the 'details form'. Until recently, when the 'list form' merely showed all the assignments without the comboboxes to zoom in, the 'list form' got updated right away. It showed updated information as soon as the data were changed on the 'details form'. But now that I use SQL strings to only show the assignments of one office, or one person, the 'list form' is no longer updated. I need to press F5 before the changes appear.
I am desparately trying to avoid having to use a requery. I'm not fond of having to jump through the form. So the big question is; why does a refresh no longer work, yet pressing F5 does?