473,586 Members | 2,681 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 1422
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

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

Similar topics

4
1963
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 combobox for Models. In both comboboxes I use the NotInList event and code to allow users to enter Makes and Models that are not in the database. When the...
0
1927
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 to and the source object is the subform. My subform record source is a query from another table (vacationTbl). FYI: I was filtering on the...
1
1305
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 OpinatedGeek comboboxes do seem to work for exacrtly what we want to do but only if you use IE! if i try and run them in netscape navigator it falls over...
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 datasource for all three comboboxes but property Datasource works in different way than I want. It looks like it copies all data to items of each combobox....
6
1260
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 the second column for the same row. In the first column, comboboxes contain names of tables. In the second column, comboboxes contain names of...
2
1754
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 a database which contains 2 fields then this data should be displayed from second row so that the user can choose the header name for this two...
2
11442
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: Fruit 2: Fruit 3:
3
1861
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 value in ALL of the comboboxes changes to the new value. I have boiled down the code to the simplest lines and placed it on its own form, but I still...
5
4047
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 each record. I don't yet see the way to update the list of values in the second combobox. Thanks for any input, Tony
2
1986
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 external tables: One for Countries that store each Country as a ID (char(2)), and Name (varchar(50)) pair; One for Medical Conditions, using ID...
0
7912
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...
0
7839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8202
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
6614
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...
0
5390
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...
0
3837
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...
0
3865
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2345
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
1
1449
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.