473,385 Members | 1,317 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Combobox help needed...

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
2 1672
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Lubomir | last post by:
Hi, I have a combobox and datagrid in a form. When an Item is selected from a combobox, a method is called, which will make selection from a database according selected item and populate...
2
by: Don | last post by:
I've looked high and low for some code that will allow me to have a combobox with a flat borderstyle. I found a few examples, but nothing that was really usable for me. I had the following...
2
by: Simon Verona | last post by:
If I have a combobox set enabled=false then by default it will have dark grey text on a grey background. I want it to show as blue on white. I'm trying code such as : combobox.enabled=false...
30
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a...
2
by: VBTricks.de.vu Webmaster | last post by:
Hello, I'm still reimplementing the GUI of my app using the new toolstrips. My current problem is to autosize a combobox to the available with in the parent toolstrip. There are some buttons...
5
by: Rich | last post by:
Hello, I have a search application to search data in tables in a database (3 sql server tables). I populate 2 comboboxes with with data from each table. One combobox will contain unique...
3
by: samoore33 | last post by:
I am populating a ComboBox at run time. I insert the first value of "Choose Value" cboTaxValue.Item.Insert(0, "Choose Value") Then I loop through the rest of the values to be added to the...
4
by: =?Utf-8?B?UmljaA==?= | last post by:
Greetings, I have to load 30,000 unique names into a combox. Filling a dataTable takes only a few milliseconds. But populating the combobox and displaying the list takes several seconds - way...
19
by: active | last post by:
I'm using a ComboBox to display objects of a class I've defined, say CQQ. Works great except somehow I occasionally set an Item to a String object instead of an object of type CQQ. It looks...
5
by: Kevinp | last post by:
I've spent the last four hours Google searching for a way to disable items in a Combobox. I found one example in C++ which I can't get to work and another in C# that I couldn't get to work either....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.