Change font color in report

  • Thread starter Thread starter Phillip
  • Start date Start date
P

Phillip

Hi,
I have a form (titlepage) with a command button that prints a report
(titlereport). The report has a text box that gets its data from a memo
field in a table. I would like to add a drop-down box (fontcolor) on the
form to allow the user to select the font color that would print in the
report. Is this possible and of so what code do I need?
Your help would be appreciated.
Thanks,
Phil
 
Put your fontcolor drop-down box on your titlepage form. Make it unbound.
Put the following code on the open event of the report:
Me!NameOfMemoTextbox.fontcolor = Forms!TitlePage!Fontcolor

Note two things:
1. TitlePage form must be open when report opens
2. fontcolor combobox must return the codes for the colors; not just the
name of the color.

Steve
(e-mail address removed)
 
I would start by creating a table with the color names and their numeric
values. Bind the numeric value column in a combo box named "cboColor". If you
want all fo the records to have the same color, add code to the On Open event
like:

Me.txtMyTextBox.ForeColor = Forms!frmYourForm!cboColor
 
Back
Top