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

option group frame can only select once

P: 2
I made a group of option radio button which update mark in txt_mark textbox. It work well except that I cant reselect my option. I have to click outside the group frame first to reselect.

My simple sub is as follows;

Expand|Select|Wrap|Line Numbers
  1. Private Sub Frame116_AfterUpdate()
  2.     Select Case Frame116.Value
  3.         Case 1
  4.             Me.txtMrkJwtBB1 = 10
  5.         Case 2
  6.             Me.txtMrkJwtBB1 = 8
  7.         Case 3
  8.             Me.txtMrkJwtBB1 = 7
  9.         Case 4
  10.             Me.txtMrkJwtBB1 = 6
  11.         Case 5
  12.             Me.txtMrkJwtBB1 = 5
  13.         Case 6
  14.             Me.txtMrkJwtBB1 = 4
  15.         Case 7
  16.             Me.txtMrkJwtBB1 = 2
  17.     End Select
  18. End Sub
Apr 26 '15 #1
Share this Question
Share on Google+
3 Replies


zmbd
Expert Mod 5K+
P: 5,397
OK,
Is it that you make the selection, say the first radio button, and then it is stuck on that first radio button despite the fact that you select a different radio button;

OR

IS it that you make the selection and the Me.txtMrkJwtBB1 control doesn't change when you make the next selection?
Apr 26 '15 #2

P: 2
zmbd, your first option was happening. Its stuck with one click.
Apr 27 '15 #3

zmbd
Expert Mod 5K+
P: 5,397
There is a very remote possibility that the pending update event is hanging your toggles.

Most likely there is another piece of code somewhere else that is related to this control that is hanging.

Try this:
On a backup copy (my first rule, never ever do work on either the production database or the only development copy - always backup the file first!)

Debug compile first. Fix any errors.

Then:
Option 1:
Place a STOP command before your select..case statement.
When the debugger starts, [F8] thru your code. See what events are triggering. Best to have two monitors so you can have the form open in one and the VBA code in the other screen; however, try to arrange the screens so that you can see what is occurring in the form.

Option 2:
Go back into design view and open the properties for the frame. Select the "On Click" Event and then copy-n-paste the code from the "After Update" event into the "On Click" event. Then delete the "After Update" code. Go back to your properties control and double check that there is no longer anything in the "After Update" (you may need to save the form, close, and reopen). Now run your form. The disadvantage here is that the [Me.txtMrkJwtBB1] control should update immediately and that may not be what you want.
Apr 27 '15 #4

Post your reply

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