Refresh a form when selecting a record in Microsoft Access
Posted on 2009-07-06
I have a form with the date from 3 linked tables on it.
tblPersonnel (This shows each individual person)
tblAccomodations (This is a linked table that shows each person's accommodations, there can be more than one per person, and yes, I know the table name is spelled incorrectly)
tbl Correspondence (This is a linked table that shows each accommodation's correspondence, there can be more than one per accommodation)
They're all on a form with the Accommodations, and Correspondence displayed in spreadsheet-style format. When I select a person's name, it shows a list of all their accommodations, and under that, a list of all the selected accommodation's correspondence.
My problem is this: Upon selecting an individual, the selected accommodation is the first in the list (that is fine), so the correspondence subform displays all the correspondence for that accommodation. (that is also fine.)
What isn't fine, is that if I select a different row to look at a different accommodation, the correspondence subform doesn't update to show the correspondence for that accommodation. It continues to show the correspondence for the previous accommodation.
Now, if I then select one of the rows of the corresponcence subform, and hit F5, it will display the correct set of correspondence for that accommodation.
I could be wrong, but I'm pretty sure that when I first made the database, it automatically displayed the correct correspondence when I selected different accommodations. So, I just need to get the sfmCorrespondence to refresh whenever I select a different record in sfmAccomodations.
Or find a way to fix it, if it's not working properly. (Note that when I select a different individual, the accommodation list updates to the new person, so I'm not quite sure what the difference should be.)