[AccessD] Select All Text in DropDown

William Hindman wdhindman at dejpolsystems.com
Thu Sep 28 14:34:54 CDT 2006


...tools/options/keyboard/select entire field?

William Hindman

----- Original Message ----- 
From: "Hollis, Virginia" <hollisvj at pgdp.usec.com>
To: <accessD at databaseadvisors.com>
Sent: Thursday, September 28, 2006 3:13 PM
Subject: [AccessD] Select All Text in DropDown


>I have a form with a combo box that brings up the data for the selected
> name in the dropdown. When the user enters, clicks, or has the focus of
> the combo I need it to select all the text in the field. For some reason
> it always goes to the beginning of the field so they can't just start
> typing a name to find it, they always have to scroll the list or
> highlight the text in the box first, then delete it or start typing
> after it is highlighted. They want the text in the combo from the
> current record to already be highlighted so they can easily find another
> record by typing the person's name without any extra steps.
> 
> 
> 
> I tried this, but it only highlights the first 3 characters of the name
> instead of the whole name. How does it determine the length of the field
> and select all of it?
> 
> 
> 
> Private Sub FindName_GotFocus()
> 
> 
> 
>    FindName.SetFocus
> 
>    FindName.SelLength = Len(FindName)
> 
> 
> 
> End Sub
> 
> 
> 
> Virginia
> 
> -- 
> 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