Gustav Brock
Gustav at cactus.dk
Fri Sep 29 08:20:08 CDT 2006
Hi Virginia When tabbing into the combo, all the text should be selected. If clicking, it should not, but the cursor should be positioned at the click point - if the cursor moves to first position, it sounds like you have some update or refresh code running at the OnClick event. /gustav >>> hollisvj at pgdp.usec.com 29-09-2006 14:57:24 >>> No, wish it was that easy..... that is already selected. When they click or enter the combo box, it does not select the existing text. Shouldn't the SelLength or one of the Sel do it? But it isn't.... Virginia ________________________________ ...tools/options/keyboard/select entire field? William Hindman ________________________________ From: Hollis, Virginia Sent: Thursday, September 28, 2006 2:13 PM To: 'accessD at databaseadvisors.com' Subject: 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