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.
Dirk Goldgar - 24 May 2007 21:19 GMT
> I would like to use one form for several different "offices" data
> entry.
[quoted text clipped - 8 lines]
>
> 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.

Signature
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
Damon Heron - 24 May 2007 21:23 GMT
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
>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.
[quoted text clipped - 8 lines]
>
> Any suggestions would be greatly appreciated.