combobox (1 Viewer)

chewy

SuperNintendo Chalmers
Local time
Today, 11:41
Joined
Mar 8, 2002
Messages
581
If someone could take a look at this and let me know if you could figure this out and send it back I would appreciate it. (Excuse my control naming) I would like ComboBoxName to be disabled until computer is chosed from ComboNameBox2. For sme reason I cant get it to work. While I am putting this out there would anyone know how to when server is chosen I want the user to be able to click the button and select all the servers and not have to select a location because there are no locations for them. thanks for ANY help!
 

Attachments

  • combo.zip
    72.5 KB · Views: 99

Hayley Baxter

Registered User.
Local time
Today, 11:41
Joined
Dec 11, 2001
Messages
1,607
It looks as though you need to put the criteria in the or section rather than the and section of the query. You say you only want one selection for server because there will never be a location. At the moment it is looking for an entry from both combo boxes before you can run the query. Will this be true in every scenario or could you sometimes have a location for an entry in the first combo where you would want to search on both? or will it always be a case of either or?

Hayley
 

chewy

SuperNintendo Chalmers
Local time
Today, 11:41
Joined
Mar 8, 2002
Messages
581
it has to be both for the computer, printer and laptop. it can only be just one for the server. I can explain more if you need it
 

Hayley Baxter

Registered User.
Local time
Today, 11:41
Joined
Dec 11, 2001
Messages
1,607
Give me a second and I'll try to get something working for you.
 

WayneRyan

AWF VIP
Local time
Today, 11:41
Joined
Nov 19, 2002
Messages
7,122
chewy,

Me.ComboBoxName.Enabled = False

Then on BeforeUpDate on other combo:

Me.ComboBoxName.Enabled = True

Wayne
 

Hayley Baxter

Registered User.
Local time
Today, 11:41
Joined
Dec 11, 2001
Messages
1,607
File sent let me know if you don't get it.

Hope this is helpful

Hayley
 

chewy

SuperNintendo Chalmers
Local time
Today, 11:41
Joined
Mar 8, 2002
Messages
581
I got it. and will take a look. Thanks!
 

chewy

SuperNintendo Chalmers
Local time
Today, 11:41
Joined
Mar 8, 2002
Messages
581
unfortunatly it's a little too over my head. So im still jind of stuck, but htanks for the effort
 

chewy

SuperNintendo Chalmers
Local time
Today, 11:41
Joined
Mar 8, 2002
Messages
581
i appreciate the help on that topic, but the thing I really wanted to get was I wanted when the user pick server I want the other combo box to be disabled, But I cant get it to work for some reason, Any ideas?
 

WayneRyan

AWF VIP
Local time
Today, 11:41
Joined
Nov 19, 2002
Messages
7,122
chewy,

Look back a few posts. I downloaded your database.
Your syntax was just a little off.

Wayne
 

chewy

SuperNintendo Chalmers
Local time
Today, 11:41
Joined
Mar 8, 2002
Messages
581
does the first code go in current?
 

WayneRyan

AWF VIP
Local time
Today, 11:41
Joined
Nov 19, 2002
Messages
7,122
Chewy,

It should go in the AfterUpdate on the first combobox.

Wayne
 

chewy

SuperNintendo Chalmers
Local time
Today, 11:41
Joined
Mar 8, 2002
Messages
581
i only want the 2nd combo to be disabled if the first says "Server". It is keeping it no matter which one I pick
 

WayneRyan

AWF VIP
Local time
Today, 11:41
Joined
Nov 19, 2002
Messages
7,122
chewy,

I'm hoping that it is this simple:

AfterUpdate on Combo1

If Me.Combo1 = "Server" Then
Me.Combo2.Enabled = False
Else
Me.Combo2.Enabled = True
End If

Wayne
 

chewy

SuperNintendo Chalmers
Local time
Today, 11:41
Joined
Mar 8, 2002
Messages
581
tried it but no go...cant figure what the problem is...i thought it would be easy
 

WayneRyan

AWF VIP
Local time
Today, 11:41
Joined
Nov 19, 2002
Messages
7,122
chewy,

It's a multi-column combo ...

If Me.ComboBoxName2.Column(1) = "Server" Then
Me.ComboBoxName.Enabled = False
Else
Me.ComboBoxName.Enabled = True
End If

Wayne
 

Hayley Baxter

Registered User.
Local time
Today, 11:41
Joined
Dec 11, 2001
Messages
1,607
Hi Chewy

Are you all sorted with this one now then. Sorry I kind of left you in the lurch there. I've been away on a little trip with work and wasn't able to check on your progress with this.

Hayley
 

chewy

SuperNintendo Chalmers
Local time
Today, 11:41
Joined
Mar 8, 2002
Messages
581
i got it going great now...thanks for everyone with their help!!
 

Users who are viewing this thread

Top Bottom