ComboBox to Dropdown after 1st letter typed..

  • Follow


As long as the Letter typed exists...I have AutoExpand enabled.

Can that be coded?

TIA - Bob
0
Reply Utf 2/10/2008 2:40:00 AM

It's very easy to drop the combo box down in its Enter event:
    Me.DropDown

If you want to respond to typing, use its Change event. You would need to 
know whether the combo is already dropped down or not. Access doesn't 
actually give you this, but it is possible to get it with an API call:
    Determining Combobox's Dropped state
at:
    http://www.mvps.org/access/api/api0052.htm

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Bob Barnes" <BobBarnes@discussions.microsoft.com> wrote in message
news:FCA3A1BD-0F77-4221-A6D9-F671C782A17C@microsoft.com...
> As long as the Letter typed exists...I have AutoExpand enabled.
>
> Can that be coded?
>
> TIA - Bob 

0
Reply Allen 2/10/2008 4:39:07 AM


Allen - OnChange didn't work, because AutoExpand interfered w/ my If the 
length was = 1..I'll try this.

Thank you - Bob

"Allen Browne" wrote:

> It's very easy to drop the combo box down in its Enter event:
>     Me.DropDown
> 
> If you want to respond to typing, use its Change event. You would need to 
> know whether the combo is already dropped down or not. Access doesn't 
> actually give you this, but it is possible to get it with an API call:
>     Determining Combobox's Dropped state
> at:
>     http://www.mvps.org/access/api/api0052.htm
> 
> -- 
> Allen Browne - Microsoft MVP.  Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
> 
> "Bob Barnes" <BobBarnes@discussions.microsoft.com> wrote in message
> news:FCA3A1BD-0F77-4221-A6D9-F671C782A17C@microsoft.com...
> > As long as the Letter typed exists...I have AutoExpand enabled.
> >
> > Can that be coded?
> >
> > TIA - Bob 
> 
> 
0
Reply Utf 2/10/2008 7:28:00 AM

In the Change event, examine the Text property of the combo (not its Value.)

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Bob Barnes" <BobBarnes@discussions.microsoft.com> wrote in message
news:94B9728E-ED88-4950-BC9A-D4C945366897@microsoft.com...
> Allen - OnChange didn't work, because AutoExpand interfered w/ my If the
> length was = 1..I'll try this.
>
> Thank you - Bob
>
> "Allen Browne" wrote:
>
>> It's very easy to drop the combo box down in its Enter event:
>>     Me.DropDown
>>
>> If you want to respond to typing, use its Change event. You would need to
>> know whether the combo is already dropped down or not. Access doesn't
>> actually give you this, but it is possible to get it with an API call:
>>     Determining Combobox's Dropped state
>> at:
>>     http://www.mvps.org/access/api/api0052.htm
>>
>> "Bob Barnes" <BobBarnes@discussions.microsoft.com> wrote in message
>> news:FCA3A1BD-0F77-4221-A6D9-F671C782A17C@microsoft.com...
>> > As long as the Letter typed exists...I have AutoExpand enabled.
>> >
>> > Can that be coded? 

0
Reply Allen 2/10/2008 8:46:21 AM

It works..even w/ the AutoExpand.

Private Sub cboDBF_Change()
If Len(cboDBF.Text) > 0 Then cboDBF.Dropdown
End Sub

Thank you - Bob

"Allen Browne" wrote:

> In the Change event, examine the Text property of the combo (not its Value.)
> 
> -- 
> Allen Browne - Microsoft MVP.  Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
> 
> "Bob Barnes" <BobBarnes@discussions.microsoft.com> wrote in message
> news:94B9728E-ED88-4950-BC9A-D4C945366897@microsoft.com...
> > Allen - OnChange didn't work, because AutoExpand interfered w/ my If the
> > length was = 1..I'll try this.
> >
> > Thank you - Bob
> >
> > "Allen Browne" wrote:
> >
> >> It's very easy to drop the combo box down in its Enter event:
> >>     Me.DropDown
> >>
> >> If you want to respond to typing, use its Change event. You would need to
> >> know whether the combo is already dropped down or not. Access doesn't
> >> actually give you this, but it is possible to get it with an API call:
> >>     Determining Combobox's Dropped state
> >> at:
> >>     http://www.mvps.org/access/api/api0052.htm
> >>
> >> "Bob Barnes" <BobBarnes@discussions.microsoft.com> wrote in message
> >> news:FCA3A1BD-0F77-4221-A6D9-F671C782A17C@microsoft.com...
> >> > As long as the Letter typed exists...I have AutoExpand enabled.
> >> >
> >> > Can that be coded? 
> 
> 
0
Reply Utf 2/11/2008 12:09:02 AM

4 Replies
577 Views

(page loaded in 0.686 seconds)


Reply: