|
|
is there a way to highlight the position of the cursor....for example if the cursor is in a textbox, the textbox background would change to a certain color. Now, if there are, say, 30 controls on the form, is there a way in program to highlight where the cursor is. If the button has the focus it is blue, if the textbox has focus it is blue or if the subform has focus it is blue... I don't think I want to code each control for focus.....is there some code to use that will check where the focus is and change the property, like the background color?
|
|
What I always use is the conditional formatting for this option. Select all the controls and choose conditional formatting. In the condition choose for "when field has focus". Choose an appropropriate background color (Yellow is a good choice) and voila.
Test is out by tabbing thtough the different controls and you'll see that the field that has focus will change the backgrounf color of the field.
A well appreciated feature by the end-users.
hth -- Maurice Ausum
"Gator" wrote:
[Quoted Text] > is there a way to highlight the position of the cursor....for example if the > cursor is in a textbox, the textbox background would change to a certain > color. Now, if there are, say, 30 controls on the form, is there a way in > program to highlight where the cursor is. If the button has the focus it is > blue, if the textbox has focus it is blue or if the subform has focus it is > blue... I don't think I want to code each control for focus.....is there > some code to use that will check where the focus is and change the property, > like the background color?
|
|
Gator wrote:
[Quoted Text] >is there a way to highlight the position of the cursor....for example if the >cursor is in a textbox, the textbox background would change to a certain >color. Now, if there are, say, 30 controls on the form, is there a way in >program to highlight where the cursor is. If the button has the focus it is >blue, if the textbox has focus it is blue or if the subform has focus it is >blue... I don't think I want to code each control for focus.....is there >some code to use that will check where the focus is and change the property, >like the background color?
For Text and Combo boxes, you can just use Conditional Formatting (Format menu) with the Has Focus option.
Other controls, (e.g. buttons) not only have no formatting, but you can not change their back color. What I've done for these controls is put a label control behind the button (so it shows around the edges and use the button's GotFocus event to change the label's back color and LostFocus to change it back.
Setting a subform's color (actually each of its sections) too doesn't make a lot of sense because you would not be able to highlight the control in the subform (unless you use another color and make your form's look like Christmas trees).
-- Marsh MVP [MS Access]
|
|
what does "you must specify criterai for all conditional formats" mean?
"Maurice" wrote:
[Quoted Text] > What I always use is the conditional formatting for this option. Select all > the controls and choose conditional formatting. In the condition choose for > "when field has focus". Choose an appropropriate background color (Yellow is > a good choice) and voila. > > Test is out by tabbing thtough the different controls and you'll see that > the field that has focus will change the backgrounf color of the field. > > A well appreciated feature by the end-users. > > hth > -- > Maurice Ausum > > > "Gator" wrote: > > > is there a way to highlight the position of the cursor....for example if the > > cursor is in a textbox, the textbox background would change to a certain > > color. Now, if there are, say, 30 controls on the form, is there a way in > > program to highlight where the cursor is. If the button has the focus it is > > blue, if the textbox has focus it is blue or if the subform has focus it is > > blue... I don't think I want to code each control for focus.....is there > > some code to use that will check where the focus is and change the property, > > like the background color?
|
|
it works now. I don't know what I was doing to cause that message. I might have unknowingly selected a control that did not allow that format...thanks
"Marshall Barton" wrote:
[Quoted Text] > Gator wrote: > > >is there a way to highlight the position of the cursor....for example if the > >cursor is in a textbox, the textbox background would change to a certain > >color. Now, if there are, say, 30 controls on the form, is there a way in > >program to highlight where the cursor is. If the button has the focus it is > >blue, if the textbox has focus it is blue or if the subform has focus it is > >blue... I don't think I want to code each control for focus.....is there > >some code to use that will check where the focus is and change the property, > >like the background color? > > > For Text and Combo boxes, you can just use Conditional > Formatting (Format menu) with the Has Focus option. > > Other controls, (e.g. buttons) not only have no formatting, > but you can not change their back color. What I've done for > these controls is put a label control behind the button (so > it shows around the edges and use the button's GotFocus > event to change the label's back color and LostFocus to > change it back. > > Setting a subform's color (actually each of its sections) > too doesn't make a lot of sense because you would not be > able to highlight the control in the subform (unless you use > another color and make your form's look like Christmas > trees). > > -- > Marsh > MVP [MS Access] >
|
|
|