here is the code
when the case ='s Radiance Plus I get an error "can not define field more than once" but if its DPN it works ok
Thanks
jon
Code:
Private Sub WCReport_Click()
Select Case [var3]
'"""""""""""""""""""""""" DPN """""""""""""""""""""""""""""""""
Case "DPN"
DoCmd.SetWarnings False
Dim stDocName As String
stDocName = "Qry-makewcreporttableDPN"
DoCmd.OpenQuery stDocName
DoCmd.SetWarnings True
If DCount(" * ", "Qry-Testzeroreport") = 0 Then
MsgBox " There is no data for this time period to report. Please re-enter your parameters"
Exit Sub
Else
Dim stDocName1 As String
stDocName1 = "Rpt-DPN WC"
DoCmd.OpenReport stDocName1, acPreview
Exit Sub
End If
'"""""""""""""""""""""""""" Radiance Plus """"""""""""""""""""""""""""""""
Case "Radiance Plus"
DoCmd.SetWarnings False
Dim stDocName4 As String
stDocName4 = "Qry-makewcreporttableRTP"
DoCmd.OpenQuery stDocName4
DoCmd.SetWarnings True
If DCount(" * ", "Qry-Testzeroreport") = 0 Then
MsgBox " There is no data for this time period to report. Please re-enter your parameters"
Exit Sub
Else
Dim stDocName5 As String
stDocName5 = "Rpt-DPN WC"
DoCmd.OpenReport stDocName5, acPreview
Exit Sub
End If
'"""""""""""""""""""""""""""""" CASE ELSE """"""""""""""""""""""""""""""""""""""""
Case Else
MsgBox "Please select a valid Report to open!", vbCritical, "Invalid Form"
Exit Sub
End Select
End Sub
when the case ='s Radiance Plus I get an error "can not define field more than once" but if its DPN it works ok
Thanks
jon