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

Signature
Steve Schapel, Microsoft Access MVP
> 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 M - 06 Jul 2006 21:00 GMT
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,
>
[quoted text clipped - 17 lines]
> > 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.
Steve Schapel - 06 Jul 2006 21:27 GMT
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

Signature
Steve Schapel, Microsoft Access MVP
> Steve,
>
[quoted text clipped - 7 lines]
>
> I failed to mentioned my option group contains check boxes.
Lewis M - 06 Jul 2006 21:56 GMT
Steve,
Thanks for the help. It was just what I needed.
> Lewis,
>
[quoted text clipped - 18 lines]
> >
> > I failed to mentioned my option group contains check boxes.