Formatting Question?

B

_Bigred

I'm using Access 2003.

I have a report that is based on a query, and ultimately contains 164
records on the report.

Is there a method that would enable me to make every other record (row)
grey.

I would like to be able to have for example:
Row 1 Grey
Row 2 White
Row 3 Grey
Row 4 White

So that reading the report is easier.

TIA,
_Bigred
 
F

fredg

I'm using Access 2003.

I have a report that is based on a query, and ultimately contains 164
records on the report.

Is there a method that would enable me to make every other record (row)
grey.

I would like to be able to have for example:
Row 1 Grey
Row 2 White
Row 3 Grey
Row 4 White

So that reading the report is easier.

TIA,
_Bigred

Make sure the BackStyle of each control is Transparent.

Code the Detail Format event:

If Me.Section(0).BackColor = vbWhite Then
Me.Section(0).BackColor = 12632256 ' gray
Else
Me.Section(0).BackColor = vbWhite
End If

====
If you wish each page to start with a white row, code the Page Header
Format event:

Me.Detail.BackColor = 12632256 'Reset color to Grey so that the
first detail line will become white

Change the colors as needed.
 
B

_Bigred

You say code the detail format event ??

Am I suppose to right click on each field in the report and paste in your
line of code or does it go somewhere else?

Thanks for your time,
_Bigred
 
D

Duane Hookom

There is only one On Format event of the Detail Section.

--
Duane Hookom
MS Access MVP


_Bigred said:
You say code the detail format event ??

Am I suppose to right click on each field in the report and paste in your
line of code or does it go somewhere else?

Thanks for your time,
_Bigred
 
B

_Bigred

Thanks that fixed the confusion.. worked like a charm.

Here is a question .. My report has a unbound text box =1 (then I have it
set to count over group). this is so when I run the report it give me a
number list.

Once I used the code below.. it makes all the fields on the report turn grey
on every other record which is desired. but it does "not" make the unbound
text box field turn grey it leaves it white. Is there a way to get around
this or should I change the unbound text box into a permanent field in the
source table/query.

Thanks Again,
_Bigred


Duane Hookom said:
There is only one On Format event of the Detail Section.
 
D

Duane Hookom

I expect Fredg's earlier comment "Make sure the BackStyle of each control is
Transparent." should fix this.
 

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