One way of doing it is to sequentilaay number all the rows on the form then
use conditional formatting to make the even numbered rows one color and the
odd numbered rows another color.
To number rows in the form ----
a.. Put the following in a standard module:
Public Function RowNum(frm As Form) As Variant
On Error GoTo Err_RowNum
With frm.RecordsetClone
.Bookmark = frm.Bookmark
RowNum = .AbsolutePosition + 1
End With
Exit_RowNum:
Exit Function
Err_RowNum:
If Err.Number <> 3021& Then 'Ignore "No bookmark" at new row.
II. Add an unbound textbox to the form and put the following in its
controlsource:
=RowNum([Form])
Note: You can set the visible property of the textbox to what you prefer.
Even numbered rows: Me!NameOfTextBox Mod 2 = 0
Odd numbered rows: Me!NameOfTextBox Mod 2 <> 0
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
Over 1175 users have come to me from the newsgroups requesting help
(e-mail address removed)
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.