Back Color on a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How would I write an "IF" statement so that when I open my form it changes
the back color? I have two menu options for this form and I want it to open
with one back color when one of the menu options is clicked and another color
when the other option is clicked. These menu options are on different
switchboard menus, not the same one.
 
I would just base two forms off the same table, each one with a different
back color, so that when either one is clicked it will open the one with the
right back color.

I could be wrong, but I don't think you can have an iif statement that
checks to see which button was clicked to open the form.
 
Secret said:
How would I write an "IF" statement so that when I open my form it
changes the back color? I have two menu options for this form and I
want it to open with one back color when one of the menu options is
clicked and another color when the other option is clicked. These
menu options are on different switchboard menus, not the same one.

Pass the desired color code in the optional OpenArgs argument and then in the
Open event of the form have code...

Me.Detail.BackColor = Me.OpenArgs
 

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

Back
Top