How to change the background color of a selected row

  • Thread starter Thread starter AoZei
  • Start date Start date
A

AoZei

Guest
:confused: <b>Hi all, can Access highlight the selected rows in table just like the spreadsheet in Excel??

Many thanks,
 
Sorry, I meant, can Access highlight individual rows in table by changing the backgound color just like the spreadsheet in Excel??
 
AoZei said:
Sorry, I meant, can Access highlight individual rows in table by changing the backgound color just like the spreadsheet in Excel??

Have done this in a report. This gives alternate rows of white and yellow, and on a laser printer the yellow shows as light grey.

You should be able to apply similar to a form.

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
Dim fColour As Boolean
Const WHITE = 16777215
Const YELLOW = 65535

If fColour Then
Me.Detail.BackColor = WHITE
Else
Me.Detail.BackColor = YELLOW
End If

fColour = Not fColour

End Sub
 

Users who are viewing this thread

Back
Top Bottom