Prev: Query Criteria
Next: Counts
From: Sue on 10 Feb 2010 11:49 Hi all I have two continuous subforms side by side on a main form which are therefore not directly linked with master and child (they have the same foreign key as the main form). I have found some code to keep the two subforms in sync which does work, but it is slightly slow and causes a kind of flickering form until it has made the sync (which repeats every time you move record). I want to keep them in sync so I can apply a conditional formatting to change the colour of some values if they don't equal some fields on the corresponding record on the other subform. Is there a better way to do this please? The code for the sync is: Dim rs As DAO.Recordset If (Not IsNull(Me![Territory])) And _ (Not IsNull(Parent.[frm Resource Planning Summary].Form![Territory])) And _ (Me![Territory] <> Parent.[frm Resource Planning Summary].Form![Territory]) Then Set rs = Parent.[frm Resource Planning Summary].Form.RecordsetClone rs.FindFirst "Territory_Code = " & """" & Me![Territory] & """" If Not rs.NoMatch Then Parent.[frm Resource Planning Summary].Form.Bookmark = rs.Bookmark End If End If Thanks...
|
Pages: 1 Prev: Query Criteria Next: Counts |