Shading alternatie rows in datasheet view and in form view?

G

Guest

I use this block of code to toggle between formview and datasheet view, in
addition to freezing 3 particualr columns when in datasheet view. I would
like to shade alternate rows. I know ive seen something on it, either here
or elsewhere. Can anyone help me out please. Many thanks in return.

'Toggle Datasheet view
Me.frmCCtrForecast.SetFocus
DoCmd.RunCommand acCmdSubformDatasheet

'Get value or toggle button
Dim intValue As Boolean
intValue = Me.tglSwitchView

'Set Toggle button caption re: state of button
If intValue = False Then
With Me.tglSwitchView
.Caption = "Datasheet View"
End With
ElseIf intValue = True Then
With Me.tglSwitchView
.Caption = "Form View"
End With

'Freeze Account, Description and PT columns
Me!frmCCtrForecast!Account.SetFocus
DoCmd.RunCommand acCmdFreezeColumn

Me!frmCCtrForecast!Description.SetFocus
DoCmd.RunCommand acCmdFreezeColumn

Me!frmCCtrForecast!PT.SetFocus
DoCmd.RunCommand acCmdFreezeColumn

End If
Exit Sub
 

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