G
Guest
I am trying to generate reports by quarters and FYD by using an option
botton. The person will select the certian option the select two certian
style of reports that will generate. I have set up all the queries and
reports for each option. In the report button I have created a string of
code in Visual Basic. But it is not work!! Does anyone have a suggestion on
what I am missing. Here is the code:
stDocName1 = "PenaltyQrt1"
stDocName2 = "PenaltyQrt2"
stDocName3 = "PenaltyQrt3"
stDocName4 = "PenaltyQrt4"
StDocName5 = "PenaltyYDT"
If Option6 = 1 And Option7 = "" And Option8 = "" And Option9 = "" And
Optioin10 = "" Then
DoCmd.OpenReport stDocName1, acViewPreview
'GoTo SkipOver
End If
'If varsortby = 2 And vardate = "" And vardateto = "" And varnbr = ""
And varvendor = "" Then
'DoCmd.OpenReport stDocName8, acViewPreview
'GoTo SkipOver
'End If
'If varsortby = 3 And vardate = "" And vardateto = "" And varnbr = ""
And varvendor = "" Then
'DoCmd.OpenReport stDocName11, acViewPreview
'GoTo SkipOver
'End If
'If varsortby = 4 And vardate = "" And vardateto = "" And varnbr = ""
And varvendor = "" Then
'DoCmd.OpenReport stDocName4, acViewPreview
'GoTo SkipOver
botton. The person will select the certian option the select two certian
style of reports that will generate. I have set up all the queries and
reports for each option. In the report button I have created a string of
code in Visual Basic. But it is not work!! Does anyone have a suggestion on
what I am missing. Here is the code:
stDocName1 = "PenaltyQrt1"
stDocName2 = "PenaltyQrt2"
stDocName3 = "PenaltyQrt3"
stDocName4 = "PenaltyQrt4"
StDocName5 = "PenaltyYDT"
If Option6 = 1 And Option7 = "" And Option8 = "" And Option9 = "" And
Optioin10 = "" Then
DoCmd.OpenReport stDocName1, acViewPreview
'GoTo SkipOver
End If
'If varsortby = 2 And vardate = "" And vardateto = "" And varnbr = ""
And varvendor = "" Then
'DoCmd.OpenReport stDocName8, acViewPreview
'GoTo SkipOver
'End If
'If varsortby = 3 And vardate = "" And vardateto = "" And varnbr = ""
And varvendor = "" Then
'DoCmd.OpenReport stDocName11, acViewPreview
'GoTo SkipOver
'End If
'If varsortby = 4 And vardate = "" And vardateto = "" And varnbr = ""
And varvendor = "" Then
'DoCmd.OpenReport stDocName4, acViewPreview
'GoTo SkipOver