473,657 Members | 2,535 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Q: Cancelling a combo dropdown

Hi

Is there a way to prevent the combo displaying its list of items when the
"combo arrow" is clicked?

The problem I'm trying to resolve is that depending on a Boolean value,
which is set according to other items on the form, I want to prevent the
combo from being used. I suppose I could set the combo to be disabled but
I'm wondering if there is something like

e.Cancel = True

within a combo event which I could use?

Thanks in advance
Jun 21 '06 #1
2 1377
I remember I have done this once. You need to extend the combobox
control and override the WndProc method.

G .Net wrote:
Hi

Is there a way to prevent the combo displaying its list of items when the
"combo arrow" is clicked?

The problem I'm trying to resolve is that depending on a Boolean value,
which is set according to other items on the form, I want to prevent the
combo from being used. I suppose I could set the combo to be disabled but
I'm wondering if there is something like

e.Cancel = True

within a combo event which I could use?

Thanks in advance


Jun 21 '06 #2
G .Net wrote:
Hi

Is there a way to prevent the combo displaying its list of items when the
"combo arrow" is clicked?

The problem I'm trying to resolve is that depending on a Boolean value,
which is set according to other items on the form, I want to prevent the
combo from being used. I suppose I could set the combo to be disabled but
I'm wondering if there is something like

e.Cancel = True

within a combo event which I could use?

Thanks in advance


If you don't want them to use it, disable it. Why would you need
something else? Hide it could be an option. Things you can't use that
aren't visible help the user to focus on what he can do.
--
Rinze van Huizen
C-Services Holland b.v
Jun 23 '06 #3

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

Similar topics

1
1706
by: Dale Geffs | last post by:
I have a form with a combo box and when it (combo) gets focus I issue a .dropdown. Using A2K and SP1 everything works fine and the list drops down under the control as expected. If I use a PC with SP3 the dropdown actually pops up over the combo box covering it completely. Same exact form and source code in both examples. Anyone ever seen anything like this before? Dale
5
4300
by: Paul | last post by:
I have read the posts on using Sendkeys to dropdown the list in a combo box. However, doesn't that require the combo box to have the focus? My situation is a little different. I have a text box and on the BeforeUpdate of that text box I check a value. If the value > 0, then the text box is OK and the program can continue. If the value = 0 or null, I want a combo box to drop down. For simplicity here are the control names:
9
3393
by: Bob Alston | last post by:
In 2002, "GrayJay" posted the following code: I did this in a jazz record catalogue to find composers - On a form "frmComposers" Create a text box - txtFindComposer, and add the following sub Private Sub txtFindComposer_Change() Requery Me!.SetFocus
8
18341
by: Lyn | last post by:
Hi, Can anyone tell me how the initial value displayed in Combo Box is determined when a form is opened? I am loading the dropdown from one field ("CategoryName") of a table, with "ORDER BY ". The values in the dropdown are loaded in the correct order, but the initial value is not the first row of the dropdown as I expected. The field "CategoryName" is not the primary key for the table -- the PK is
1
1685
by: RICHARD BROMBERG | last post by:
I have a form with a combo box. It is in the first Tab Stop when the form opens. The dropdown area should be immediately below the combo box as all others on the form, but it isn't. The dropdown list ia about a half inch below the combo box , but as soon as I click the combo box the dropdown list jumps up and attaches itself to the combo box. Very peculiar.
2
7526
by: dancole42 | last post by:
So I have a subform that lists the various items on a particular invoice. First, the user selects a product class from the Class dropdown. This is bound to the Class field in the InvioceLines table. The rowsource for the combobox is: ClassName, ClassID, ClassSort from the Class table, with the bound column set to ClassID.
4
6710
by: =?Utf-8?B?cmFuZHkxMjAw?= | last post by:
The code below goes into the dropdown event handler for a standard combo box. It makes the dropdown as wide as the widest text entry. Unfortunately, this combo box is on the right edge of the screen, so if the user has a really wide entry, the dropdown expands off the right edge of the screen. Any suggestions on how to modify the code below to make the dropdown width expand to the left, instead of to the right? Thanks, Randy
2
7044
by: biganthony via AccessMonster.com | last post by:
Hi, I decided to install Office 2003 Service Pack 3 on my home computer to test (in full knowledge that there may be some issues with it). After installation, I have noticed that with a small database I wrote for home, the combo boxes and listboxes no longer display the bound column. For example, on a form I have a combo box based on a table called 'names'. The two columns in the combo box are ID and Surname. The combo box and list box...
2
1769
by: ARC | last post by:
I'm testing a user's db that contains a very large number of records. I have an invoice screen, with an invoice select dropdown box that shows all invoices, and the customer's name, etc. With 80,000+ invoices in this particular db, clicking the dropdown is painfully slow accross a network only (I'm testing on a wireless, so it's even slower still). All fields are properly indexed, such as the invoice number (sort descending), etc. I've...
0
8392
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8603
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7320
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1604
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.