Going to the Left side of a field (textbox) when entered.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Howdy!

I am new to ACCESS but I am starting to use Input Masks to make sure my data
is put in the same each time. But some people are clicking into the text box
and it is putting them in the middle of the mask instead of the beginning of
the mask. Is there anything I can do to make sure that when they click into
the text box that it starts from the left-side and not the location in the
box where they clicked?

Any help would be greatly appreciated and as always THANKS IN ADVANCE!!!

Chip
 
Howdy!

I am new to ACCESS but I am starting to use Input Masks to make sure my data
is put in the same each time. But some people are clicking into the text box
and it is putting them in the middle of the mask instead of the beginning of
the mask. Is there anything I can do to make sure that when they click into
the text box that it starts from the left-side and not the location in the
box where they clicked?

Any help would be greatly appreciated and as always THANKS IN ADVANCE!!!

Chip

Sorry! If you click into a control that is where the cursor will be
set.
However, if you code the control's Enter event to:

Me![ControlName].SelStart = 0

and you tab into (or set focus to the control using code),
the cursor will go to the beginning of the control.
 
Chip wrote in message
Howdy!

I am new to ACCESS but I am starting to use Input Masks to make sure
my data is put in the same each time. But some people are clicking
into the text box and it is putting them in the middle of the mask
instead of the beginning of the mask. Is there anything I can do to
make sure that when they click into the text box that it starts from
the left-side and not the location in the box where they clicked?

Any help would be greatly appreciated and as always THANKS IN
ADVANCE!!!

Chip

Are you really sure you want to do that? I'll tell you, it can be very
annoying if you try to edit for instance the year, but every time you
click within the control, you find the cursor ending up at the very
left
in stead.

In the mouseup event of the control, you can try the code offered by
Ofer Cohen.
 
Back
Top