Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple one . . . When I mouse cl

Status
Not open for further replies.

Hoving

Technical User
Apr 8, 2002
21
US
Simple one . . .

When I mouse click into any text box that has an input
mask (e.g., a date field with !99/99/00;0), the cursor
appears at the location I clicked. How do I
set it up so the cursor goes to the start of the field
(i.e., to the beginning of the text box, just as it does
when you tab), regardless of where you click in the text box?

I've tried removing the '!' from the input mask; Text
Align properties are set to LEFT; I went to Tools >
Options > Keyboard tab and selected "Go to start of field"
under "Behavior entering field." (The Help menu suggested
I go to Tools > Options > Right-to-Left tab, but there is
no Right-to-Left tab.)

Do I need code for something this simple? Thanks.

(Running Access 2000.)

- Hoving

 
Hi Hoving!

Remove the input mask altogether and let the user enter the date anyway they like and set the format to short date.

hth
Jeff Bridgham
bridgham@purdue.edu
 
Erm, check out Tools, Options, Keyboard, Behaviour entering field. Change this to 'Go to start of field' and you should get the desired effect.

Just thinking, that may not work if someone is clicking in the fields (ie with mosue). Oh well, we can but try...

You could try setting focus on the onclick function for the field. If you set focus to a second field and then reset focus to the original field, it should bring the focus in at the beginning of the original field.

ie. private sub field1_onclick()

field2.setfocus
field1.setfocus

endsub

Hope that makes sense. Best of luck

Regards Tim
 
Setting the focus as you suggested worked perfectly. Thanks.

- Hoving

> You could try setting focus on the onclick function
> for the field. If you set focus to a second field
> and then reset focus to the original field, it should
> bring the focus in at the beginning of the original
> field.

> ie. private sub field1_onclick()

> field2.setfocus
> field1.setfocus

> endsub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top