every other row + datasheet + Cond Format

J

JK

Any idea why this won't work in AC2003 - SP3?

Option Compare Database

' Declare an instance of our class
Private CF As clsConditionalFormattingDataSheetView


Private Sub Form_Current()
' Call our redraw function.
' We have to do this here because of a bug using
' Withevents to sink a Form's events from a Class module.
CF.Redraw
End Sub


Private Sub Form_Load()
' startup our class
Set CF = New clsConditionalFormattingDataSheetView
' You must set a reference to a TextBox control
' that you have placed anywhere in the Detail section.
' Don't worry about the control's size or placement.
' The class will position, size and set it's properties as required.
CF.KeyFieldControl = Me.txtcustomerID

' Set the desired Highlight Color
CF.HighlightColor = CLng(vbRed)
End Sub

Private Sub Form_Unload(Cancel As Integer)
' Release the reference to our class.
Set CF = Nothing
End Sub
 
S

Smartin

Any idea why this won't work in AC2003 - SP3?

Option Compare Database

' Declare an instance of our class
Private CF As clsConditionalFormattingDataSheetView

Private Sub Form_Current()
' Call our redraw function.
' We have to do this here because of a bug using
' Withevents to sink a Form's events from a Class module.
CF.Redraw
End Sub

Private Sub Form_Load()
' startup our class
Set CF = New clsConditionalFormattingDataSheetView
' You must set a reference to a TextBox control
' that you have placed anywhere in the Detail section.
' Don't worry about the control's size or placement.
' The class will position, size and set it's properties as required.
CF.KeyFieldControl = Me.txtcustomerID

' Set the desired Highlight Color
CF.HighlightColor = CLng(vbRed)
End Sub

Private Sub Form_Unload(Cancel As Integer)
' Release the reference to our class.
Set CF = Nothing
End Sub

What doesn't work? Do you have the class object code in your project?
 

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