473,466 Members | 1,286 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Combobox control

173 New Member
Hi,

Ive got a form which has three Comboboxes, 1) User, 2) Department and 3) Site....

Underneath the comboboxes i have a subform which displays records if i select a user, department or a site..

What i want to know is, if i select one combobox, how do i dim out the other two comboboxes? so if i choose a user from the user combobox, how can i shade away the department and site comboboxes?

all help will be appreciated ..


thanks
Sep 3 '07 #1
5 1399
Stwange
126 Recognized Expert New Member
Hi,

Ive got a form which has three Comboboxes, 1) User, 2) Department and 3) Site....

Underneath the comboboxes i have a subform which displays records if i select a user, department or a site..

What i want to know is, if i select one combobox, how do i dim out the other two comboboxes? so if i choose a user from the user combobox, how can i shade away the department and site comboboxes?

all help will be appreciated ..


thanks
Look at the after_update() property, and use the following code for each of the other combo-boxes:
comboWhatever.enabled = False
Sep 3 '07 #2
Beany
173 New Member
Look at the after_update() property, and use the following code for each of the other combo-boxes:
comboWhatever.enabled = False

thank you for your reply,

for my comboboxes ive already got some data in the after_update event, for example one of the combos has:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Combo2_AfterUpdate()
  2.     blnUser = True
  3.     FilterSubForm
  4.  
  5.   Me.Combo2.Requery
  6.  
  7. End Sub
where would i insert
Expand|Select|Wrap|Line Numbers
  1. comboWhatever.enabled = False
??

thanks
Sep 3 '07 #3
Beany
173 New Member
any1? im kinda stuck.....

thanks peeps
Sep 3 '07 #4
Beany
173 New Member
If the combobox after_update event is occupied with other code,

where would i insert
Expand|Select|Wrap|Line Numbers
  1. comboWhatever.enabled = False
?
Sep 4 '07 #5
MMcCarthy
14,534 Recognized Expert Moderator MVP
Using this example and assuming the other two combo boxes are 1 and 3 ....

Expand|Select|Wrap|Line Numbers
  1. Private Sub Combo2_AfterUpdate()
  2.  
  3.     Me.Combo1.Enabled = False
  4.     Me.Combo3.Enabled = False
  5.  
  6.     blnUser = True
  7.     FilterSubForm
  8.  
  9.     Me.Combo2.Requery
  10.  
  11. End Sub
  12.  
Beany it would help the experts if in future you experimented a little with the advice you are given to see for yourself how it works. Then if you don't get the behaviour you expect you can tell the experts what you have tried. If the experts can't see that you are trying to figure it out for yourself they will be discouraged from helping you.

Mary
Sep 5 '07 #6

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

Similar topics

8
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
5
by: Quan Nguyen | last post by:
How can I obtain the textbox (editing field) control of the combobox? I tried combobox.Controls to obtain the collection of controls that the combobox contains but it turned out to be empty. Thanks.
0
by: Mike | last post by:
Hi all! I have an OwnerDrawVariable ComboBox in .net. In the ComboBox DropDown event I display another control - works well. In the control's Leave event I remove the control - works well. So...
4
by: Ben Coats | last post by:
Hey, I'm trying to find code for an Explorer-style Directory ComboBox. (You know, it display "Desktop", "My Computer", all drives, etc., but it has a treeview control inside the combobox so that...
6
by: Sakharam Phapale | last post by:
Hi All, How to fill one ComboBox from other ComboBox control? 1) Only setting the reference does the trick but doesn't show items in control. If you see in immediate window, it shows...
2
by: Don | last post by:
I've looked high and low for some code that will allow me to have a combobox with a flat borderstyle. I found a few examples, but nothing that was really usable for me. I had the following...
6
by: dbuchanan | last post by:
VS2005 I've been reading all the help I can on the topic (MSDN, other) but I can't make sense of this. Desired behavior; The user is to choose from the displayed list of the databound combobox...
6
by: tbrown | last post by:
I have a combobox with items like this: {one,two,three}. The selected index is 0, so "one" appears in the combobox text. When the user drops down the list, and selects "two", for example, I...
3
by: Simon Tamman | last post by:
I've come across an interesting bug. I have workarounds but i'd like to know the root of the problem. I've stripped it down into a short file and hope someone might have an idea about what's going...
2
by: Andrus | last post by:
SWF DataGridView contains combobox control. Activating combobox and pressing F4 to open dropdown menu causes strange NRE (see below). When I enter some valid value to combobox, press tab,...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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
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
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
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...
0
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
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 ...

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.