From: wkaibigan on 21 May 2010 09:24 Hi All I am totally stumped at the moment with trying to use the Conditional Formatting classes written by Stephen. I am in the process of rewriting a database. Some of the functionality remains the same and is just getting a cosmetic tweak. In this instance I am trying to re- create a search result form which is based on a continuous form and used the Conditional Formatting to change the colour of the currently selected record. This is working fine in the original database but for some reason it not working in the new one. I have imported the classes and modules into the new database and the code on the form is pretty much identical in both the original and the new database. I have also tried importing the working form from the original database and changing the recordsource but that exhibits the same behaviour. I have done a Google search but have not found any reference to why it I should be having this problem. Just wondering if anybody has come across this before and has any ideas what the problem is. I am using Access 2003. Cheers Nick
From: wkaibigan on 21 May 2010 09:31 This is the code used which is the same for both forms Option Compare Database Private CF As ClsConditionalFormatting Private Sub Form_Current() CF.Redraw End Sub Private Sub Form_Load() Set CF = New ClsConditionalFormatting CF.BGTextBox = Me.txtBackground CF.HighlightColor = 13555879 CF.ShowHighlighting = True End Sub Private Sub Form_Unload(Cancel As Integer) Set CF = Nothing End Sub
From: wkaibigan on 24 May 2010 05:04 Found the problem. Had missed out including the ID fields which the Class looks for. All working now.
|
Pages: 1 Prev: Filtering, RecordsetClone, Main Form - Subform Issues Next: Buttons for multiple subforms...? |