472,333 Members | 1,069 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Avoid typing text in a combobox?

lk
Hi there,

is it possible to avoid that a user could enter a text directly in a
combobox?

The user should only select a text from the list of the combobox without
typing anything.

Thanks

LuKe
Nov 13 '05 #1
5 11888
Set the combobox's LimitToList property to True. They'll still be able to
type, but their typing won't be accepted unless it's in the list.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"lk" <ce**********@email.it> wrote in message
news:3a*************@individual.net...
Hi there,

is it possible to avoid that a user could enter a text directly in a
combobox?

The user should only select a text from the list of the combobox without
typing anything.

Thanks

LuKe

Nov 13 '05 #2
lk
Douglas J. Steele wrote:
Set the combobox's LimitToList property to True. They'll still be able to
type, but their typing won't be accepted unless it's in the list.

Thanks for your answer.

I have already used that property.
But the problem is just the alert message.

I want to avoid the user could type in the combobox.

ByE

LuKe
Nov 13 '05 #3
This would be one method. Add to the list of allowed keys as needed.

Private Sub Combo0_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyTab, vbKeyEscape, vbKeyReturn
Case Else
KeyCode = 0
End Select
End Sub

Setting the KeyCode to 0 cancels the key entry.

--
Wayne Morgan
MS Access MVP
"lk" <ce**********@email.it> wrote in message
news:3a*************@individual.net...
Douglas J. Steele wrote:
Set the combobox's LimitToList property to True. They'll still be able to
type, but their typing won't be accepted unless it's in the list.

Thanks for your answer.

I have already used that property.
But the problem is just the alert message.

I want to avoid the user could type in the combobox.

ByE

LuKe

Nov 13 '05 #4
lk
Wayne Morgan wrote:
This would be one method. Add to the list of allowed keys as needed.

Private Sub Combo0_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyTab, vbKeyEscape, vbKeyReturn
Case Else
KeyCode = 0
End Select
End Sub

Setting the KeyCode to 0 cancels the key entry.

THANKS!!!!!
LuKe
Nov 13 '05 #5
hi,

Private Sub YOURCombo_NotInList(NewData As String, Response As Integer)
Response = False
End Sub

bye,
ste

lk <ce**********@email.it> wrote in message news:<3a*************@individual.net>...
Douglas J. Steele wrote:
Set the combobox's LimitToList property to True. They'll still be able to
type, but their typing won't be accepted unless it's in the list.

Thanks for your answer.

I have already used that property.
But the problem is just the alert message.

I want to avoid the user could type in the combobox.

ByE

LuKe

Nov 13 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tor Inge Rislaa | last post by:
Avoid autoselect in combobox In the load procedure of a form I am filling a combobox with data from a database. The combobox fill the data OK,...
3
by: Mark P | last post by:
How to solve this? 1. Place a ComboBox in a form 2. On the ComboBox Properties window change the Items to hold: a b c d
2
by: Pepi Tonas | last post by:
I am using a combobox in an application, where I don't want the text to be changed, limiting the displayed text to those assigned to each item in...
4
by: Vish | last post by:
Hi, I need to make the text on a combobox that is disabled to be drawn with a black color. I was not able to find any help on this online. The...
5
by: CCLeasing | last post by:
Hello, I have searched google but can not find a straight forward answer to my problem. Hopefuly someone will be kind enough to offer their...
16
by: John U. | last post by:
Hi Group, Here is a common problem: I have many (100) links on a web page, all pointing to different pages on the same domain (e.g., "http://...
1
by: Simon | last post by:
Dear reader, One of the properties of a field is "Auto expand". Is this the property to able and unable the expend by typing. My...
3
by: Simon van Beek | last post by:
Dear reader, What can be wrong in my ComboBox, the property "Auto Expand" is set to Yes, but by typing in the ComboBox it doesn't expand. Is...
2
by: =?Utf-8?B?UmFqbmVlc2ggTmFyYWlu?= | last post by:
Hi, I have a ComboBox in a Windows app (.net2.0). And when users start typing into it, the dropdown populates itself from a webservice and gives...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...

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.