Stephen Leban's Conditional Formatting

W

wkaibigan

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
 
W

wkaibigan

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
 
W

wkaibigan

Found the problem. Had missed out including the ID fields which the
Class looks for. All working now.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top