How to start a combo near the right place

Vivitech

Registered User.
Local time
Today, 20:12
Joined
May 11, 2004
Messages
18
I have a typical "search and edit" form populated from a table of, say, 1000 items.

On entry to the form I have an unbound combo field which, under certain circumstances, I would like to make "jump" to a certain point down the list, by matching, say, the first 3 characters of an "UnknownItem" string.

cmbName = Left(sUnknownItem, 3)

but when I click the dropdown, even though the combo contains the first 3 chars of the "unknown item", it hasn't jumped to that part of the list. It doesn't do that until you start to add letters to the 3.

Is there any way of triggering the jump from the code so that the user can just scroll from the right starting point?
 
Hi,

This seems to work:
Code:
  Me.cbo.SetFocus
  Me.cbo.Text = "FOL"
  Me.cbo.SelStart = Len(Me.cbo.Text)
  Me.cbo.Dropdown
Succes,
Bert
 

Users who are viewing this thread

Back
Top Bottom