ACC1x: How to Use Custom Colors in Microsoft Access

ID: Q106299


The information in this article applies to:


SUMMARY

This article describes how to use colors that are not available on the color palette for forms and reports in Microsoft Access version 1.x.

In Microsoft Access version 2.0, you can use the Color Builder to create custom colors for your forms and reports. For more information, search for "custom colors" using the Help menu in Microsoft Access 2.0.


MORE INFORMATION

Microsoft Access 1.x can use any of the colors available to Microsoft Windows. Custom colors that you create in Windows can be created in Microsoft Access as well. The following example demonstrates how to use a custom color in Microsoft Access 1.x:

  1. In the Microsoft Windows Control Panel, choose the Colors Icon.


  2. Choose Color Palette.


  3. Choose Define Custom Colors.


  4. Pick the color you want by clicking in the large color square in the Custom Color Selector dialog box.


  5. Note the numbers next to the Red, Green, and Blue boxes. Write these numbers down in order (for example, Red=233, Green=44, Blue=99).


  6. Choose Close to close the Custom Color Selector dialog box, and then close the Control Panel.


  7. Start Microsoft Access.


  8. Open the database that contains the form or report you want to change.


  9. Create a new module. From the View menu, choose Immediate Window.


  10. In the Immediate window, type the following, and then press ENTER:

    NOTE: This example uses the numbers from step 5. Substitute your own custom color numbers for these numbers.

    ?RGB(233,44,99)


  11. Note the number that is returned in the Immediate window. This number is a Long integer representing your custom color. In this example, the value returned is 6499561.


  12. Open the form or report you want to change in Design view.


  13. Select the object you want to assign the custom color to.


  14. Set the object's Color property to the value noted in step 11.



REFERENCES

Microsoft Access "User's Guide," version 1.0, pages 310-312

Microsoft Access "User's Guide," version 1.1, pages 314-316

Additional query words: ADK


Keywords          : kbusage FmrColr 
Version           : 1.0 1.1
Platform          : WINDOWS 
Issue type        : kbhowto 

Last Reviewed: March 27, 1999