Simple form to send chosen report to printer with CRViewer91. Form has a Frame control with 3 Option Buttons, 2 Command Buttons. Following is code for the cmdSelect Report button.
Private Sub cmdSelectReport_Click()
'View Report and Print user choice
Dim Value As Boolean
Select Case Value
Case optAssist(0).Value = True
frmCRViewerAssist.Show
Case optBoard(1).Value = True
frmCRViewerMonth.Show
Case optAnnual(2).Value = True
frmCRViewerYear.Show
Case Else
'If optAssist(0).Value = True Then
' frmCRViewerAssist.Show
'ElseIf optBoard(1).Value = True Then
' frmCRViewerMonth.Show
'ElseIf optAnnual(2).Value = True Then
' frmCRViewerYear.Show
' ElseIf optGraph(3).Value = True Then
' frmCRViewerGraph.Show
' Else
MsgBox "You have not made a selection" & vbCrLf & _
"Please select one option or press Cancel", 32, "Make Print Selection"
'End If
End Select
End Sub
The Select Case code drops to he MsgBox when the click event is fired regardless is a button is checked or not checked.
The If ElseIf code that is commented out works like a charm with no problems but I know that the Case Statement will work. I'm missisng something simple in the Select Case statement I think. Any help appreciated
Select Case True
Case optAssist(0).Value
frmCRViewerAssist.Show
Case optBoard(1).Value
frmCRViewerMonth.Show
Case optAnnual(2).Value
frmCRViewerYear.Show
Case Else
'...