Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Option buttons enabled unexpectedly

Status
Not open for further replies.

BillyL

IS-IT--Management
Jul 18, 2000
91
US
I have a form with three frames contining option buttons:
Frame #1: fraFunds, has three options: Fund1 (default), Fund2 and AllFunds
Frame #2: fraReport, has Summary (default) and Detail1, Detail2
Frame #3: fraOutput, has Preview (default) and Print

It is set up so if AllFunds is selected in fraFunds, Detail1 and Detail2 are disabled and only Summary is enabled in fraReport. If I select another fund in fraFunds, all option buttons in fraReport are endabled. This works fine.

The problem is when I select the Print option in fraOutput, all option buttons in fraReport become enabled again. If I select another fund option button in fraOption and then select the AllFunds option, Detail1 and Detail2 become dissabled again. And if I select Preview in fraOutput, then all options in fraReport again become enabled.

How can I set it up so as long as AllFunds is selected, the Detail1 and Detail2 options are always disabled regardless of any other actions?

Any Ideas?
 
Hi Billy L,
Below works for me!

Private Sub HandleFrames()
On Error GoTo ErrHf
If Me.FrameFunds = 3 Then 'allfunds
Me.FrameReport = 1 'summary
Me.Check5.Enabled = False 'detail1
Me.Check6.Enabled = False 'detail2
Else
Me.Check5.Enabled = True
Me.Check6.Enabled = True
End If

ExitHF:
Exit Sub

ErrHf:
MsgBox Err.Number & " " & Err.Description, vbInformation, "Handle Frames error."
Resume ExitHF
End Sub

Private Sub FrameFunds_AfterUpdate()
HandleFrames
End Sub

Private Sub FrameReport_AfterUpdate()
HandleFrames
End Sub

Enjoy! Gord
ghubbell@total.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top