Textbox highlight when form open

guestbb

Registered User.
Local time
Today, 08:26
Joined
Jul 14, 2015
Messages
44
When I open form, it always highlights the first field, or if textbox is empty it selects that textbox as if i was to write in it. there are many textboxs in the forms.
is there any way to deselect the textboxes so that when i open the form this doesnt happen. if i want to start typing i would click in it.
 
Focus has to go somewhere. Put a button or something first in the tab order.
 
More specifically, you are not allowed to give the form itself focus as long as any of the controls are enabled. Therefore, if you don't want your textboxes to be highlighted, then do as Paul suggests. Create a "dummy" control that can be enabled and therefore can get the focus. Then (if it is a bound form), on Form_Current you can force focus to your selected control.

As it happens, I do this with a HELP button, but then again, there are many choices available here. Make something up if you have to. I am reminded of the old saying "Everybody has to be somewhere." Well, focus has to be somewhere, too.
 
A simpler solution I use is to create an additional text box, size it as 0.001 x 0.001, set it as transparent with no border and stick it first in the tab order, crude but effective:cool:

This is better than using a button on continuous forms as you do not end up with lots of dummy buttons, just one pretty much invisible text box at the start of each line.
 

Users who are viewing this thread

Back
Top Bottom