Clear an option in a option group.

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.
 
S

Steve Schapel

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
 
G

Guest

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.
 
S

Steve Schapel

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
 

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