[AccessD] Sel Start and Sel Length not working for me

Charlotte Foust cfoust at infostatsystems.com
Thu Apr 2 14:36:52 CDT 2009


Public Sub SelectEntire(ctl As Control)
  On Error Resume Next
  ctl.SelStart = 0
  ctl.SelLength = Len(ctl.Text) + 1
  If Err <> 0 Then
    ctl.SelLength = Len(ctl.Value) + 1
  End If
End Sub


Charlotte Foust 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
Sent: Thursday, April 02, 2009 12:03 PM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] Sel Start and Sel Length not working for me

Dear List:

In the got focus event of a bound text box I want to have all the
current text selected.  The box can only have a 0 or 1.It is bound to a
field of data type number

The following code should (I think, but obviously not) select all the
text in the box but doesn't.  Can anyone see why?

 

    Me.fldFHxDetailMotherResponse.SelStart = 0
    Me.fldFHxDetailMotherResponse.SelLength =
len(Me.fldFHxDetailMotherResponse)

I also tried:

    Me.fldFHxDetailMotherResponse.SelStart = 0
    Me.fldFHxDetailMotherResponse.SelLength = 1


just to make things simple.  But no soap.

 
MTIA,
 

Rocky Smolin

Beach Access Software

858-259-4334

www.e-z-mrp.com <http://www.e-z-mrp.com/> 

www.bchacc.com <http://www.bchacc.com/> 

 

 








More information about the AccessD mailing list