[AccessD] I have a mouse user

Bob Gajewski rbgajewski at roadrunner.com
Fri Jun 10 13:48:39 CDT 2011


Hi John

Private Sub txtDteRequestedleave_Click()
    txtDteRequestedleave.SelStart = 0
    txtDteRequestedleave.SelLength = Nz(Len(txtDteRequestedleave), 0)
End Sub

You can use this on Click, DoubleClick, Enter, GotFocus, etc.

Best regards,
Bob Gajewski 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Friday, June 10, 2011 13:56 PM
To: Access Developers discussion and problem solving
Subject: [AccessD] I have a mouse user

who clicks in dates and times and cannot figure out how to enter / modify
the date once they do that.  I need to select the entire thing when they
enter the text box.  I tried the following:


Private Sub txtDteRequestedleave_Enter()
     txtDteRequestedleave.SelStart = 0
     DoEvents
     On Error Resume Next
     txtDteRequestedleave.SelLength = Len(txtDteRequestedleave.Value)
     DoEvents

End Sub

It doesn't work, even though the individual pieces are *supposed* to do what
I am looking for.  In 
fact if I set a breakpoint and run it, then when I come back to the form the
entire thing is selected.

The Doevents is a feeble attempt to let it figure out that I have selected
the thing.

Does anyone have code that accomplishes what I am trying to accomplish?
-- 
John W. Colby
www.ColbyConsulting.com
-- 
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