By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,327 Members | 1,806 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,327 IT Pros & Developers. It's quick & easy.

Combobox help needed...

P: n/a
I am having a problem trying to figure out how I can make my combobox
function as you see the ones on the web . I am trying to make it so
that if the user uses the keyboard and enters lets say "a" but you
have about 10 names starting with "a" for it to keep going for as long
as there is another "a" in the combobox until the disired name
appears. Any help is greatly appreciated.

My current setup is simple I only have one form and one table and the
combobox is called "caller".

Thanks,

Seb.
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
The ones on the web that you mention don't have a box to type into, it is
strictly the list. Basically, the boxes are designed differently. I don't
know if you could find a third party component that will do this or not,
you'd just have to look around and see what you can find.

Now, to do this with what's available in Access:
You may be able to do this with 3 controls, a textbox, a toggle button, and
a listbox. Place the toggle button next to the textbox to make it look like
a combo box. When the toggle button is pressed make the listbox visible.
When the toggle button is clicked again or a selection is made in the
listbox, hide the listbox. Place the selected value in the textbox. Set the
Locked and Enabled properties of the textbox to Yes. Use the KeyDown event
of the textbox to get the value of the pressed key. Move to the first row in
the listbox that starts with the pressed letter. Use Static variables in the
KeyDown event to remember the last key pressed and how many times it was
pressed so that you know if you need to move to the next row starting with
that letter and place the value of that row in the textbox.

I tried a couple of tests that appear to indicate this will work, but I
haven't gone through and coded it.

--
Wayne Morgan
Microsoft Access MVP
"ss78" <sc*************@yahoo.com> wrote in message
news:36**************************@posting.google.c om...
I am having a problem trying to figure out how I can make my combobox
function as you see the ones on the web . I am trying to make it so
that if the user uses the keyboard and enters lets say "a" but you
have about 10 names starting with "a" for it to keep going for as long
as there is another "a" in the combobox until the disired name
appears. Any help is greatly appreciated.

My current setup is simple I only have one form and one table and the
combobox is called "caller".

Thanks,

Seb.

Nov 12 '05 #2

P: n/a
sc*************@yahoo.com (ss78) wrote in message news:<36**************************@posting.google. com>...
I am having a problem trying to figure out how I can make my combobox
function as you see the ones on the web . I am trying to make it so
that if the user uses the keyboard and enters lets say "a" but you
have about 10 names starting with "a" for it to keep going for as long
as there is another "a" in the combobox until the disired name
appears. Any help is greatly appreciated.

My current setup is simple I only have one form and one table and the
combobox is called "caller".

Thanks,

Seb.


Check to make sure that the query or SQL that provides the rowsource
has your name field sort set to ascending. You can also change the
List Rows property to display as many name as you like, although I
don't think you can set this with VBA. May be wrong, but I am sure
someone will tell me if I am. You could also have the names displayed
in list form as soon as the combo box receives the focus. This saves
the user from clicking on the arrow. Put this in the On Got Focus
event of the combo box.

Private Sub Caller_GotFocus()
Me!Caller.Dropdown
End Sub

Hope this helps

David
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.