473,509 Members | 2,526 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

3 Comboboxes

173 New Member
Hi,

How can i hide or disable one combobox when another combobox is selected?

All help will be appreciated

thanks
Sep 10 '07 #1
11 1406
damonreid
114 Recognized Expert New Member
You can just do an if loop or a case select on each of the combo boxes to disable the other ones when selected on the first.
Expand|Select|Wrap|Line Numbers
  1. me.comboboxnumber.enabled = false
Sep 10 '07 #2
Beany
173 New Member
You can just do an if loop or a case select on each of the combo boxes to disable the other ones when selected on the first.
Expand|Select|Wrap|Line Numbers
  1. me.comboboxnumber.enabled = false

ok thats brill..but how would i enable them by clicking on them?
Sep 10 '07 #3
damonreid
114 Recognized Expert New Member
If you want to be able to change it perhaps you should change the locked status and not the enable status? If this is what you want to do then.

Else try this.
Expand|Select|Wrap|Line Numbers
  1. me.comboboxname.enable = true
Sep 10 '07 #4
Beany
173 New Member
If you want to be able to change it perhaps you should change the locked status and not the enable status? If this is what you want to do then.

Else try this.
Expand|Select|Wrap|Line Numbers
  1. me.comboboxname.enable = true

sorry but i dont understand, ive got three comboboxes, Combo2, Combo4 and Combo6.

Ive put the following in Combo2:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Combo2_AfterUpdate()
  2.     blnUser = True
  3.     FilterSubForm
  4.  
  5.     Me!Text18.ControlSource = "[ID]"
  6.  
  7.   Me.Combo4.Enabled = True
  8.   Me.Combo6.Enabled = True
  9.     Me.Combo2.Requery
  10. End Sub
But its not doing anything? am i doing something obviously wrong?
Sep 10 '07 #5
damonreid
114 Recognized Expert New Member
Do you want them to only use one combo box?
If so change the ".enabled = true" to ".enabled = false" for the other two combo boxes.
Sep 10 '07 #6
Beany
173 New Member
Do you want them to only use one combo box?
If so change the ".enabled = true" to ".enabled = false" for the other two combo boxes.

okay but then i cant click on the other two... it disables them...


What i want is: The user can only select from one combobox but if he wants to select from another, he just puts the cursor over it and it enables...

i was told this wasnt possible? is that true?
Sep 10 '07 #7
damonreid
114 Recognized Expert New Member
I am not sure what the point is in disabling them, why not just leave the fields open?

You could add an "After Update" event on each of the fields to clear the values in the other two if you want?
Sep 10 '07 #8
Beany
173 New Member
I am not sure what the point is in disabling them, why not just leave the fields open?

You could add an "After Update" event on each of the fields to clear the values in the other two if you want?

Ok, thats a good idea, becoz the comboboxes dont clear...

what would i put in the after update event for it to clear?

thanks so far bud
Sep 10 '07 #9
damonreid
114 Recognized Expert New Member
Try this
Expand|Select|Wrap|Line Numbers
  1. me.comboxboxname.value = ""
Sep 10 '07 #10
Beany
173 New Member
Try this
Expand|Select|Wrap|Line Numbers
  1. me.comboxboxname.value = ""

thanks damon! for all the help
Sep 11 '07 #11
damonreid
114 Recognized Expert New Member
No problem, glad I could help.
Sep 11 '07 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

4
1959
by: Kathy | last post by:
In my custom menu one menu item opens a form to add new Makes to TblMakes and another menu item opens a form to add new Models to TblModels. I have a form that has a combobox for Makes and a...
0
1920
by: johnson_cy | last post by:
I am using Access 2000. My main form has a record source of a table (employeeTbl with key of . It is filtering the record results. My subform and mainform have the link child/link master set...
1
1295
by: Craig G | last post by:
for months we have been dabling round looking at various 3rd party comboboxes that allow the user to type text into the combobox as a search mechanism what we've found is that the likes of...
1
379
by: Marcin Podle¶ny | last post by:
Hi, I've a form with three comboboxes. Each of them contains the same data - all cities in my country. As you see it's a lot of data so it takes a lot of memory. I'd like to use the same...
6
1249
by: Sam | last post by:
Hi, I have a datagrid which has (amongst other stuff) 2 comboboxes columns. So far so good. The trick is that when I select a value in my first column, it must updates the items of the combobox in...
2
1749
by: ashishtarlekar | last post by:
Hi all, I have to add comboboxes in the first row of datagridview for mapping the database fields. For e.g. I have to show Id, FirstName, LastName in each comboboxes in the first row. if i select...
2
11437
by: Matt | last post by:
Hi all, me again! :) I've now got an issue with combo boxes. Basically, I have a number of items that I want a user to pick from a single list. It's basically along the lines of: Fruit 1: ...
3
1854
by: Randy | last post by:
I have a routine that creates a series of comboboxes, each of which is bound to a common dataview. Everything used to work fine, but now, when I change the value of any of the comboboxes, the...
5
4042
by: Anthony Bollinger | last post by:
I have two tables in a master-detail relationship. When I make a selection in one combobox, how do I have it display the values from a second combobox? Each table has a key and a text value for...
2
1980
by: Wingot | last post by:
Hey, I have a view to a database that I have created for Client Maintenance. It has a number of fields, but the important ones are Medical Condition, Bill To, and Country. I have a couple of...
0
7410
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7067
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7505
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...
0
5650
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,...
0
4729
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...
0
3215
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...
0
3201
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1570
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 ...
0
440
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...

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.