I have a problem with a Select Case situation.
As the report opens there is a parameter box that opens asking for the Month of the year. That information is stored in the Month textbox.
At the bottom of the report, in the footer, I have a textbox called TxtTotalUOS.
I need the following computation [LengthofService Grand Total Sum] / ((DLookup(“AnnualUOSTotal”, “tblCompanyFacts”) / 12) * X) X will be a number between 1 to 12.
The results need to be stored in the txtTotalUOS unbound textbox.
I put the following in the forms On Open event.
Private Sub Report_Open(Cancel As Integer)
‘ Figure TotalUOS/Expected
Dim strTotalUOS As Integer
On Error Resume Next
strTotalUOS = Month
Select Case Month
Case “July”
txtTotalUOS = ([LengthofService Grand Total Sum] / ((DLookup(“AnnualUOSTotal”, “tblCompanyFacts”) / 12) * 1))
Case “August”
txtTotalUOS = ([LengthofService Grand Total Sum] / ((DLookup(“AnnualUOSTotal”, “tblCompanyFacts”) / 12) * 2))
Case “September”
txtTotalUOS = ([LengthofService Grand Total Sum] / ((DLookup(“AnnualUOSTotal”, “tblCompanyFacts”) / 12) * 3))
Case “October”
txtTotalUOS = ([LengthofService Grand Total Sum] / ((DLookup(“AnnualUOSTotal”, “tblCompanyFacts”) / 12) * 4))
End Select
End Sub
Thank you! Fay