Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / March 2008

Tip: Looking for answers? Try searching our database.

What is a combobox that cannot be typed in

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DF.thangld - 23 Mar 2008 17:41 GMT
Hey, anybody know about a combobox that cannot be typed in but can be
changed SelectedIndex? I mean, user can choose the item, but cannot type in
the combobox itself? I don't remember its name. And can you give me some
sample about how to use it. Thanks a lot!
Rick Brandt - 23 Mar 2008 17:48 GMT
> Hey, anybody know about a combobox that cannot be typed in but can be
> changed SelectedIndex? I mean, user can choose the item, but cannot
> type in the combobox itself? I don't remember its name. And can you
> give me some sample about how to use it. Thanks a lot!

There is no such animal in Access.

You can use a ListBox (which providesno place to type), but that does not
drop down like a ComboBox.

You can set up a ComboBox so that the user must type an entry that matches
one that is in the list, but you cannot disallow typing completely.

Signature

Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

Wendy - 23 Mar 2008 19:04 GMT
Hi,
Have you tried setting the property - "Limit to List" = YES
Wendy

> Hey, anybody know about a combobox that cannot be typed in but can be
> changed SelectedIndex? I mean, user can choose the item, but cannot type in
> the combobox itself? I don't remember its name. And can you give me some
> sample about how to use it. Thanks a lot!
Linq Adams - 23 Mar 2008 23:57 GMT
In the form Design View, select the combobox and goto Properties - Event and
click in the box for OnKeyDown. When the ellipsis shows up, click on it,
click on Build Code then use this code:

Private Sub YourComboBox_KeyDown(KeyCode As Integer, Shift As Integer)
 KeyCode = 0
End Sub

Now nothing will happen when the user presses any key.

BTW, setting  "Limit to List" to  YES doesn't prevent typing in the combobox,
it merely pops up an error message when the typed data doesn't match an item
in the box.

Signature

There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.