Change text color in report

  • Thread starter Thread starter stumpy
  • Start date Start date
S

stumpy

Is it possible to change the text color of a report field if an option button
is checked
in a form.
Form Printlabels has
option2 = red
option4 = blue
option6 = white

is it possible to change the forcolor of txtbox(text1)in report( rptlabels )
depending which option is chosen in form Printlabels

any help is appreciated
 
stumpy said:
Is it possible to change the text color of a report field if an option button
is checked
in a form.
Form Printlabels has
option2 = red
option4 = blue
option6 = white

is it possible to change the forcolor of txtbox(text1)in report( rptlabels )
depending which option is chosen in form Printlabels


Use a little VBA code in the report control's Format event
(or in this case you could use the report's Open event):

Select Case Forms![the form name.[the option frame]
Case 2
Me.[the report control].ForeColor = vbRed
Case 4
Me.[the report control].ForeColor = vbBlue
Case 6
Me.[the report control].ForeColor = vbWhite '?????
End Select

Are you sure your want white text for option 6? White text
on a white background is really difficult to read ;-)
 
Many thanks Marshall

The labels to be print are of Avery labels type, on the form there is the
ability to import images (code found within previous postings) to print on
these labels.
If the image is dark hence the need for white text.

Marshall Barton said:
stumpy said:
Is it possible to change the text color of a report field if an option button
is checked
in a form.
Form Printlabels has
option2 = red
option4 = blue
option6 = white

is it possible to change the forcolor of txtbox(text1)in report( rptlabels )
depending which option is chosen in form Printlabels


Use a little VBA code in the report control's Format event
(or in this case you could use the report's Open event):

Select Case Forms![the form name.[the option frame]
Case 2
Me.[the report control].ForeColor = vbRed
Case 4
Me.[the report control].ForeColor = vbBlue
Case 6
Me.[the report control].ForeColor = vbWhite '?????
End Select

Are you sure your want white text for option 6? White text
on a white background is really difficult to read ;-)
 
Back
Top