Form Backgroundcolor

G

Guest

I would like to use one form for several different "offices" data entry.
The value for the "office" is provided on an "Office Menu" form.

Once the user clicks on their Office name, I would like the data entry
screen's background to be a different color for each "office".

I looked through the discussion thread and see conditional formating and
form background items, but none explan how to use a control to "control" the
color of background color of the form itself.

Any suggestions would be greatly appreciated.
 
D

Dirk Goldgar

In
dsc2bjn said:
I would like to use one form for several different "offices" data
entry.
The value for the "office" is provided on an "Office Menu" form.

Once the user clicks on their Office name, I would like the data entry
screen's background to be a different color for each "office".

I looked through the discussion thread and see conditional formating
and form background items, but none explan how to use a control to
"control" the color of background color of the form itself.

Any suggestions would be greatly appreciated.

I'd probably use code in the form's Open event to determine whic office
is current and set the BackColor property of the form's Detail section.
If the FormHeader and FormFooter sections are displayed, I'd set their
BackColor properties, too.

If the Office Menu form is always open, then code in the data entry
form's Open event could refer directly to that form and the selected
office on that form, to find out which office is current. Otherwise, it
would probably have to use the DLookup() function to retrieve the value
from a table or query.
 
D

Damon Heron

You can change the form's detail with:

Me.Detail.BackColor = 255 'red in this case

Do you have the office selection on the same form? If so, in the
afterupdate event of the selection, for instance a combobox with all of the
Offices listed, use a Select Case routine to choose the color based on the
selected item.

Damon
 

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