Combo boxes like an option group?

A

AccessKay

Can you have three combo boxes on a search form and restrict the user to
choose only one, somewhat like an option group? How in general would you do
this…if it is possible?

TIA,
Kay
 
A

Al Campagna

Kay,
Sure, but there are many ways to do that.
You could use a 3 checkbox option group control which of 3 combos
are enabled/disbled
..
Combo1 Combo2 Combo3
<=== Option Group
--
hth
Al Campagna
Microsoft Access MVP 2007-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
B

Beetle

I'm going to assume that these are unbound combo boxes
since you said they are on a search form (don't do this if the are
bound to fields).

In the After Update event of each combo box set the other
two boxes to Null;

Private Sub Combo1_AfterUpdate

Me.Combo2 = Null
Me.Combo3 = Null

End Sub

Private Sub Combo2_AfterUpdate

Me.Combo1 = Null
Me.Combo3 = Null

End Sub

Private Sub Combo3_AfterUpdate

Me.Combo1 = Null
Me.Combo2 = Null

End Sub
 
Joined
Apr 16, 2010
Messages
3
Reaction score
0
If the user can only use filter at a time then why not stack them and toggle the visibility with another box. Or you could just use the additional box to alter the values.

ie.
cmbFilterType values := "Filter1", "Filter2", "Filter3"

Private Sub cmbFilterType_AfterUpdate ()
Select Case cmbFilterType.Value
Case "Filter1"
Call FilterOff
cmbFilter1.Visible = True
Case "Filter2"
Call FilterOff
cmbFilter2.Visible = True
Case Else
Call FilterOff
cmbFilter3.Visible = True
End Select
End Sub


Private Sub FilterOff ()
Filter1.Visible = False
Filter2.Visible = False
Filter3.Visible = False
End Sub
 
M

Mark Andrews

Do an option group with three radio buttons and place a combo box next to
each radio button. On the after update event of the option group
basically make the combo box next to the radio button that is selected
visible and hide the other two. Alternatively keep them all visible and
enable/disable the combo boxes (whichever makes more sense for the
situation).

That way to the user they are picking an option of which choice they want to
make.

Radio buttons indicate that only one choice is available (checkboxes
indicate many choices are available).

HTH,
Mark Andrews
RPT Software
http://www.rptsoftware.com
http://www.donationmanagementsoftware.com
 
A

Al Campagna

Kay,
Mark's description is what I was referring to, but I would just
enable/disable,
rather than show/hide.
Seems more visually logical to select Check1 and see Combo1 enable...
and
Combo2 and Combo3 disable... or select Check2 and see Combo 2 enable and
Combo1 and Combo3 disable... etc...
Also, the user can see that there are always 3 possible combos to select
from.

More of a "style" choice than a right/wrong method.
--
hth
Al Campagna
Microsoft Access MVP 2007-2009
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."


AccessKay via AccessMonster.com said:
I think Mark just answered my question to you Al. I understand now. I'm
going to try it and see if this way works better.

Thank you Mark!


Mark said:
Do an option group with three radio buttons and place a combo box next to
each radio button. On the after update event of the option group
basically make the combo box next to the radio button that is selected
visible and hide the other two. Alternatively keep them all visible and
enable/disable the combo boxes (whichever makes more sense for the
situation).

That way to the user they are picking an option of which choice they want
to
make.

Radio buttons indicate that only one choice is available (checkboxes
indicate many choices are available).

HTH,
Mark Andrews
RPT Software
http://www.rptsoftware.com
http://www.donationmanagementsoftware.com
Can you have three combo boxes on a search form and restrict the user to
choose only one, somewhat like an option group? How in general would
you
[quoted text clipped - 3 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top