ACC: Form Control Is Not Transparent When It Gets Focus

Last reviewed: May 30, 1997
Article ID: Q155668
The information in this article applies to:
  • Microsoft Access versions 7.0, 97

SYMPTOMS

When you set the BackStyle property of a form control to Transparent, the control's background color is visible when the control has the focus.

RESOLUTION

To display a transparent background at all times, set the BackColor property of the control equal to the BackColor property of the form section in which it resides.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

CAUTION: Following the steps in this example will modify the sample database Northwind.mdb (or NWIND.MDB in version 2.0). You may want to back up the Northwind.mdb file or perform these steps on a copy of the Northwind database.

  1. Open the sample database Northwind.mdb.

  2. Open the Employees form in Design view.

  3. On the View menu, click Properties.

  4. Click the Last Name Text Box, and set its BackStyle property to Transparent.

  5. On the View menu, click Form. Note that the background color of the Last Name control matches the background color of the detail section on the form.

  6. Click the Last Name control so that it has the focus. Note that the background color changes to white.

  7. Click another control on the form to move the focus away from the Last Name control. Note that the background color of the Last Name control changes to match the background color of the detail section on the form.

  8. On the View menu, click Form Design.

  9. Click the Last Name control and set its BackColor property to -2147483633, which is the same as the BackColor property setting for the detail section on the form.

  10. On the View menu, click Form. Click in and out of the Last Name control and note that the background color remains the same, whether or not the control has the focus.

REFERENCES

For more information about setting the background color of a form control, search the Help Index for "BackColor Property," or ask the Microsoft Access 97 Office Assistant.

For more information about setting the background style of a form control, search the Help Index for "BackStyle property," or ask the Microsoft Access 97 Office Assistant.


Additional query words: foreground
Keywords : FmrColr kbusage
Version : 7.0 97
Platform : WINDOWS
Hardware : X86
Issue type : kbprb
Resolution Type : Info_Provided


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.