Clear an option in a option group.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form that has multiple tabs. On one particular tab, called ByUser, I
have an option group, which has two options. I use the options to determine
which report to run. I want to force the user to select an option every time
the ByUser tab is clicked. Right now the option is not cleared when I go to
another tab and then return to this tab, ByUser.
 
Lewis,

I would clear the Option Group whenever the ByUser tab is accessed. If
you look at the Properties of each page on your Tab Control, you will
see that it has a Page Index property, which you can use. Let's say the
Page Index of ByUser is 3, ok, so the code might look something like
this, on the Change event of the Tab Control...
If Me.NameOfTabControl = 3 Then
Me.NameOfOptionGroup = 0
End If

Alternatively...
If Me.NameOfTabControl = Me.ByUser.PageIndex Then
Me.NameOfOptionGroup = 0
End If
 
Steve,

I tried this with no success.

Private Sub Page53_Click()
If Me.TabCtl26 = Me.Page53.PageIndex Then
Me.Frame102 = 0
End If
End Sub

I failed to mentioned my option group contains check boxes.
 
Lewis,

Sorry, as I mentioned in my earlier post, I suggest the Change event of
the Tab Control, whereas you have used the Click event of the tab Page.

Private Sub TabCtl26_Change()
If Me.TabCtl26 = Me.Page53.PageIndex Then
Me.Frame102 = 0
End If
End Sub
 
Back
Top