
|
Book Home Page Bloglines 1906 CelebrateStadium 2006 OfficeZealot Scobleizer TechRepublic AskWoody SpyJournal Computers Software Microsoft Windows Excel FrontPage PowerPoint Outlook Word Host your Web site with PureHost! |
Monday, June 11, 2007 – Permalink – Access Field HighlightingMore codeThis technique can also be applied to controls like option groups. Instead of using OnGotFocus and OnLostFocus events you must use the OnEnter and OnExit events. In addition, the control group's BackStyle property must be set to Normal to take advantage of the Windows color scheme: Function Highlight(Stat As String) As Integer Take advantage of global constants. Just add the following two statements to a module: Global Const Orange = 39423 Global Const LightBlue = 16776960 Then, set the OnGotFocus and OnLostFocus events for the controls in the following format: Private Sub controlName_GotFocus() See all Topics access Labels: VBA <Doug Klippert@ 6:14 AM
Comments:
Post a Comment
|