A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

What is a combobox that cannot be typed in



 
 
Thread Tools Display Modes
  #1  
Old March 23rd, 2008, 04:41 PM posted to microsoft.public.access.forms
DF.thangld
external usenet poster
 
Posts: 2
Default What is a combobox that cannot be typed in

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!

  #2  
Old March 23rd, 2008, 04:48 PM posted to microsoft.public.access.forms
Rick Brandt
external usenet poster
 
Posts: 4,354
Default What is a combobox that cannot be typed in

DF.thangld wrote:
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.

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


  #3  
Old March 23rd, 2008, 06:04 PM posted to microsoft.public.access.forms
Wendy
external usenet poster
 
Posts: 255
Default What is a combobox that cannot be typed in

Hi,
Have you tried setting the property - "Limit to List" = YES
Wendy

"DF.thangld" wrote:

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!


  #4  
Old March 23rd, 2008, 10:57 PM posted to microsoft.public.access.forms
Linq Adams via AccessMonster.com
external usenet poster
 
Posts: 1,474
Default What is a combobox that cannot be typed in

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.

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

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200803/1

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:57 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.