Changing text color and textbox color on Access Report

C

Cindy

Hi,

I'm trying to change the text color and textbox color whenever a user
input from another form says "BLACK" to "Color Preference". By
default, the textbook's background color is white and text's color is
black, but when the user input "BLACK" to the color preference, I
would like to change the color of the textbox on the report to black,
and therefore the text color to white (otherwise it can't be seen).

How do I do that? Is there a VBA code that does this? I have to link
the user's answer from another form to the textbox that's in the
report.

Thanks a lot!
 
M

Marshall Barton

Cindy said:
I'm trying to change the text color and textbox color whenever a user
input from another form says "BLACK" to "Color Preference". By
default, the textbook's background color is white and text's color is
black, but when the user input "BLACK" to the color preference, I
would like to change the color of the textbox on the report to black,
and therefore the text color to white (otherwise it can't be seen).

How do I do that? Is there a VBA code that does this? I have to link
the user's answer from another form to the textbox that's in the
report.

The code should be in the report to look at the preferences
value and set the report controls' ForeColor and BackColor
properties.

The preferences values should be stored in a table because
forms can not store anything. You can use the DLookup
function to retrieve a value from the table.

If you need help writing the code, post details about the
preferences table and its fields and specific information
about what should happen to what in the report.
 

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