By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,294 Members | 2,687 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,294 IT Pros & Developers. It's quick & easy.

Help to clear a combo box when a option button is selected.

P: 19
I have set up two option buttons. When option button 1 is selected I need to make sure that the combo box located beside Option button 2 is cleared. In turn I need to make sure that if a value is selected from the combo box that option button 2 is selected.
Help me please!!
Nov 21 '06 #1
Share this Question
Share on Google+
6 Replies


Expert 100+
P: 218
Hi ducky

First, a question..

Are your option buttons inside an option box?

Steve
Nov 21 '06 #2

P: 19
Hi ducky

First, a question..

Are your option buttons inside an option box?

Steve
Yes they are in an option box.
Nov 21 '06 #3

MMcCarthy
Expert Mod 10K+
P: 14,534
I have set up two option buttons. When option button 1 is selected I need to make sure that the combo box located beside Option button 2 is cleared. In turn I need to make sure that if a value is selected from the combo box that option button 2 is selected.
Help me please!!
Assuming Option frame name as opt_frame1 and combobox name as combo0.

You will need an event on the option frame, so for this example I'm using the after update event.

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub opt_frame1_AfterUpdate()
  3.  
  4.   Select Case opt_frame1
  5.  
  6.     Case 1 ' if 1 is selected
  7.       Me.Combo0 = Null 
  8.  
  9.     Case 2 'if 2 is selected
  10.       ' whatever you want to do here
  11.  
  12.   End Select
  13.  
  14. End Sub
  15.  
You will need an event on the combobox, so for this example I'm also using the after update event.

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub Combo0_AfterUpdate()
  3.  
  4.   Me.opt_frame1 = 2
  5.  
  6. End Sub
  7.  
Nov 21 '06 #4

P: 19
Thank you very much!! It worked.. :)
Nov 21 '06 #5

MMcCarthy
Expert Mod 10K+
P: 14,534
Thank you very much!! It worked.. :)
You're welcome.
Nov 21 '06 #6

P: 74
So i'm trying to use this coding but its not working. here is what i'm attempting...

i have a form based on a query i'm using to search previous records, i have two combo boxes i use to search data, after i run a update procedure of one combo box the information is displayed in text boxes. I use combo box "A" to search the records by name, and combo box "B" to search by number. i need each combo box to appear null after the update procedure runs. any thoughts?
Mar 12 '07 #7

Post your reply

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