Form Backgroundcolor

  • Thread starter Thread starter Guest
  • Start date Start date
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.
 
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.
 
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
 
Back
Top