![]() |
|
|
#1
|
|||
|
|||
|
On my forms, I want to have the background color on a textbox change when it is selected, then go back to default when you tab to the next textbox. Is there some generic code that will do this? I have up to 20 txtboxes per tab, and dont want to have to add code specifically for each box...
thanks |
|
#2
|
||||
|
||||
|
You would need to put code or a macro in the GotFocus/LostFocus or OnEnter/OnExit events of each control. Hmm...I wonder if creating the control you want and then using it to set your default control would add the code as well. I'll have to give that a try.
__________________
(RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 - acXP, ac07 If your issue is resolved...follow this link for directions on how to use the Solved thread tool! Teaching is not filling a bucket but lighting a fire. Borrowed quote..."Docendo discimus" |
|
#3
|
||||
|
||||
|
OK, a macro does not stay with the default control but it is *real* easy to set the two events of many controls to the same macros. And it is easy to create two macros that work in all of the controls.
__________________
(RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 - acXP, ac07 If your issue is resolved...follow this link for directions on how to use the Solved thread tool! Teaching is not filling a bucket but lighting a fire. Borrowed quote..."Docendo discimus" |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Color/font change in subform
|
AndyKim | Forms | 9 | 06-24-2009 02:34 PM |
| Export Report as jpeg (in color) | Kupot | Reports | 1 | 05-28-2009 06:13 PM |
| background color in a form | taggart | Forms | 1 | 05-07-2009 08:37 AM |
| Row and colum color editing | jerald | Database Design | 0 | 03-18-2009 03:52 PM |
| change cell color | bishop743 | Programming | 0 | 02-01-2009 08:00 AM |