[AccessD] Position cursor at beginning of field

Jim Lawrence accessd at shaw.ca
Tue Sep 13 10:11:53 CDT 2005


Hi Gina:

This line of code would set the cursor to the last position of a piece of
data in a field.

txtMyFormField.SelStart = txtMyFormField.SelLength

If the field is empty the cursor is placed at the first position in the
field.

HTH
Jim

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gina Hoopes
Sent: Tuesday, September 13, 2005 7:48 AM
To: AccessD at databaseadvisors.com
Subject: [AccessD] Position cursor at beginning of field

Is it possible to set the cursor at the beginning of a field on got focus? I

often provide people with an input mask for a date field but if they click 
into the field instead of tabbing (or Enter-ing) in they end up having 
trouble getting the date in correctly.



Thanks,
Gina


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list