colors

E

Elias

On a report, I have a text box named "RecordCount" with a
control source: =[CurrentRecord] & "."

This numbers the records, as in:

1. record #1
2. record #2
3. record #3
and so on.

Right now, the back color (font color) of the text box is
black. Is there a way to make every other text box a
different color, as in: black, grey, black, grey, etc.?
 
F

fredg

On a report, I have a text box named "RecordCount" with a
control source: =[CurrentRecord] & "."

This numbers the records, as in:

1. record #1
2. record #2
3. record #3
and so on.

Right now, the back color (font color) of the text box is
black. Is there a way to make every other text box a
different color, as in: black, grey, black, grey, etc.?

What color is it you wish to alternate? The BackColor or the
FontColor? The ForeColor is the font color, the BackColor is the
control background color.

In the Detail format event:
If [ControlName].ForeColor = vbBlack then
[ControlName].ForeColor = 12632256
Else
[ControlName].ForeColor = vbBlack
End If

Substitute .BackColor if that is what you meant.
 
E

Elias

Thanks Fred,

Forecolor is what I was after. After re-reading my
posting I am surprised that you made sense of my
question. Again, thanks that did the job!

Can I do something like this with command buttons on
forms? I would like to know how to change the
BackColor/background color on command buttons.

Thanks!!!!


-----Original Message-----
On a report, I have a text box named "RecordCount" with a
control source: =[CurrentRecord] & "."

This numbers the records, as in:

1. record #1
2. record #2
3. record #3
and so on.

Right now, the back color (font color) of the text box is
black. Is there a way to make every other text box a
different color, as in: black, grey, black, grey, etc.?

What color is it you wish to alternate? The BackColor or the
FontColor? The ForeColor is the font color, the BackColor is the
control background color.

In the Detail format event:
If [ControlName].ForeColor = vbBlack then
[ControlName].ForeColor = 12632256
Else
[ControlName].ForeColor = vbBlack
End If

Substitute .BackColor if that is what you meant.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
F

fredg

Thanks Fred,

Forecolor is what I was after. After re-reading my
posting I am surprised that you made sense of my
question. Again, thanks that did the job!

Can I do something like this with command buttons on
forms? I would like to know how to change the
BackColor/background color on command buttons.

Thanks!!!!
-----Original Message-----
On a report, I have a text box named "RecordCount" with a
control source: =[CurrentRecord] & "."

This numbers the records, as in:

1. record #1
2. record #2
3. record #3
and so on.

Right now, the back color (font color) of the text box is
black. Is there a way to make every other text box a
different color, as in: black, grey, black, grey, etc.?

What color is it you wish to alternate? The BackColor or the
FontColor? The ForeColor is the font color, the BackColor is the
control background color.

In the Detail format event:
If [ControlName].ForeColor = vbBlack then
[ControlName].ForeColor = 12632256
Else
[ControlName].ForeColor = vbBlack
End If

Substitute .BackColor if that is what you meant.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.

Not using Access as delivered.
You can use a Label.
Code it's Mouse Down and Mouse Up events to simulate the special
effects appearance of the command button movement.
Code it's Click event as needed.

However, Steven Lebans has a workaround to change the command button
color. It's also a good site to visit.

http://www.lebans.com
 

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