Need to be a little more specific.
What version of Access are you using? If A2007, then the details section of
both reports and forms contain a "Alternate Back Color" property. Just set
the color of this property to achieve your goal.
If you are using an earlier version of Access, it becomes a little more
difficult (at least I don't remember earlier versions containing this
property). If you have a field in your forms RecordSource (table or query)
which contains a sequential numeric value (you could call this a row number),
then you could:
1. Create an unbound textbox and size it to span the entire width and
height of the detail section.
2. You will then have to move it to the background (I think 2003 has this
ability) by right clicking on the textbox and selecting - Position -> Send to
Back from the popup menu. You may also have to select each of the other
controls and bring them to the front.
3. Then set its Tab Stop property to No
4. In the controls GotFocus event, set the focus to one of the other
controls in the details section of the form.
5. Finally, set the conditional formatting for that text box so that the
condition is based on an expression. The expression will look something like:
Same technique will work for a report, although you won't have to do steps 3
and 4 in a report. Another method in a report would be to use the Format
event of the detail section. Add the following code to that event to get
alternate color backgrounds.
Static RowCount As Long
RowCount = RowCount + 1
Me.Section(acDetail).BackColor = IIf(RowCount Mod 2 = 0, RGB(255, 255,
255), RGB(236, 250, 252))