Code:
Private Sub Report_Open(Cancel As Integer)Dim rst As Recordset
Dim rst2 As Recordset
Dim sql As String
Dim mode As String
Dim crs As String
Dim crsbase As String
Dim dat As Date
Dim plr As String
Dim fs As Integer 'front score
Dim bs As Integer 'back score
Dim t As Integer 'total score
mode = Right(Me.OpenArgs, 7)
dat = Left(Me.OpenArgs, 11)
crs = Left(Me.OpenArgs, Len(Me.OpenArgs) - 7)
crs = Right(crs, Len(crs) - 11)
Select Case mode
Case Is = "latest0"
crsbase = crs
Case Is = "latest1"
sql = "select * from results where event = #" & Format(dat, "dd mmm yyyy") & "# and left(course,instr(course,' ')-1) = '" & Left(crs, InStr(crs, " ") - 1) & "' order by playerID asc"
Set rst = CurrentDb.OpenRecordset(sql, dbOpenDynaset)
crsbase = Left(crs, InStr(1, crs, " ") - 1)
Case Is = "latest2"
sql = "select * from results where event = #" & Format(dat, "dd mmm yyyy") & "# and left(course,instr(course,' ')-1) = '" & Left(crs, InStr(crs, " ") - 1) & "' order by playerID asc"
Set rst = CurrentDb.OpenRecordset(sql, dbOpenDynaset)
rst.MoveNext
rst.MoveNext
rst.MoveNext
rst.MoveNext
crsbase = crs
Case Is = "latest3"
sql = "select * from results where event = #" & Format(dat, "dd mmm yyyy") & "# and left(course,instr(course,' ')-1) = '" & Left(crs, InStr(crs, " ") - 1) & "' order by playerID asc"
Set rst = CurrentDb.OpenRecordset(sql, dbOpenDynaset)
rst.MoveNext
rst.MoveNext
rst.MoveNext
rst.MoveNext
rst.MoveNext
rst.MoveNext
rst.MoveNext
rst.MoveNext
crsbase = crs
Case Is = "latest4"
sql = "select * from results where event = #" & Format(dat, "dd mmm yyyy") & "# and left(course,instr(course,' ')-1) = '" & Left(crs, InStr(crs, " ") - 1) & "' order by playerID asc"
Set rst = CurrentDb.OpenRecordset(sql, dbOpenDynaset)
rst.MoveNext
rst.MoveNext
rst.MoveNext
rst.MoveNext
rst.MoveNext
rst.MoveNext
rst.MoveNext
rst.MoveNext
crsbase = crs
End Select
Me.WSR.Caption = "CR" & vbCrLf & "SLOPE"
Me.YSR.Caption = "CR" & vbCrLf & "SLOPE"
Me.BSR.Caption = "CR" & vbCrLf & "SLOPE"
Me.RSR.Caption = "CR" & vbCrLf & "SLOPE"
sql = "select * from courses where left(course,instr(1,course,' ')-1) = '" & crsbase & "'"
Set rst2 = CurrentDb.OpenRecordset(sql, dbOpenDynaset)
Do Until rst2.EOF
Select Case (Right(rst2!course, 2))
Case "MB"
If IsNull(rst2!D1) = False And rst2!D1 <> "" Then
Me.WD1.Caption = rst2!D1
Me.WD2.Caption = rst2!D2
Me.WD3.Caption = rst2!D3
Me.WD4.Caption = rst2!D4
Me.WD5.Caption = rst2!D5
Me.WD6.Caption = rst2!D6
Me.WD7.Caption = rst2!D7
Me.WD8.Caption = rst2!D8
Me.WD9.Caption = rst2!D9
Me.WDF.Caption = rst2!D1 + rst2!D2 + rst2!D3 + rst2!D4 + rst2!D5 + rst2!D6 + rst2!D7 + rst2!D8 + rst2!D9
Me.WDO.Caption = rst2!D1 + rst2!D2 + rst2!D3 + rst2!D4 + rst2!D5 + rst2!D6 + rst2!D7 + rst2!D8 + rst2!D9
Me.WD10.Caption = rst2!D10
Me.WD11.Caption = rst2!D11
Me.WD12.Caption = rst2!D12
Me.WD13.Caption = rst2!D13
Me.WD14.Caption = rst2!D14
Me.WD15.Caption = rst2!D15
Me.WD16.Caption = rst2!D16
Me.WD17.Caption = rst2!D17
Me.WD18.Caption = rst2!D18
Me.WDB.Caption = rst2!D10 + rst2!D11 + rst2!D12 + rst2!D13 + rst2!D14 + rst2!D15 + rst2!D16 + rst2!D17 + rst2!D18
Me.WDT.Caption = rst2!D1 + rst2!D2 + rst2!D3 + rst2!D4 + rst2!D5 + rst2!D6 + rst2!D7 + rst2!D8 + rst2!D9 + rst2!D10 + rst2!D11 + rst2!D12 + rst2!D13 + rst2!D14 + rst2!D15 + rst2!D16 + rst2!D17 + rst2!D18
End If
Me.WSR.Caption = "CR " & rst2!course_rating & vbCrLf & "SLOPE " & rst2!course_slope
Me.GP1.Caption = rst2!P1
Me.GP2.Caption = rst2!P2
Me.GP3.Caption = rst2!P3
Me.GP4.Caption = rst2!P4
Me.GP5.Caption = rst2!P5
Me.GP6.Caption = rst2!P6
Me.GP7.Caption = rst2!P7
Me.GP8.Caption = rst2!P8
Me.GP9.Caption = rst2!P9
Me.GP10.Caption = rst2!P10
Me.GP11.Caption = rst2!P11
Me.GP12.Caption = rst2!P12
Me.GP13.Caption = rst2!P13
Me.GP14.Caption = rst2!P14
Me.GP15.Caption = rst2!P15
Me.GP16.Caption = rst2!P16
Me.GP17.Caption = rst2!P17
Me.GP18.Caption = rst2!P18
Me.GI1.Caption = rst2!I1
Me.GI2.Caption = rst2!I2
Me.GI3.Caption = rst2!I3
Me.GI4.Caption = rst2!I4
Me.GI5.Caption = rst2!I5
Me.GI6.Caption = rst2!I6
Me.GI7.Caption = rst2!I7
Me.GI8.Caption = rst2!I8
Me.GI9.Caption = rst2!I9
Me.GI10.Caption = rst2!I10
Me.GI11.Caption = rst2!I11
Me.GI12.Caption = rst2!I12
Me.GI13.Caption = rst2!I13
Me.GI14.Caption = rst2!I14
Me.GI15.Caption = rst2!I15
Me.GI16.Caption = rst2!I16
Me.GI17.Caption = rst2!I17
Me.GI18.Caption = rst2!I18
Me.LP1.Caption = rst2!P1
Me.LP2.Caption = rst2!P2
Me.LP3.Caption = rst2!P3
Me.LP4.Caption = rst2!P4
Me.LP5.Caption = rst2!P5
Me.LP6.Caption = rst2!P6
Me.LP7.Caption = rst2!P7
Me.LP8.Caption = rst2!P8
Me.LP9.Caption = rst2!P9
Me.LP10.Caption = rst2!P10
Me.LP11.Caption = rst2!P11
Me.LP12.Caption = rst2!P12
Me.LP13.Caption = rst2!P13
Me.LP14.Caption = rst2!P14
Me.LP15.Caption = rst2!P15
Me.LP16.Caption = rst2!P16
Me.LP17.Caption = rst2!P17
Me.LP18.Caption = rst2!P18
Me.LI1.Caption = rst2!I1
Me.LI2.Caption = rst2!I2
Me.LI3.Caption = rst2!I3
Me.LI4.Caption = rst2!I4
Me.LI5.Caption = rst2!I5
Me.LI6.Caption = rst2!I6
Me.LI7.Caption = rst2!I7
Me.LI8.Caption = rst2!I8
Me.LI9.Caption = rst2!I9
Me.LI10.Caption = rst2!I10
Me.LI11.Caption = rst2!I11
Me.LI12.Caption = rst2!I12
Me.LI13.Caption = rst2!I13
Me.LI14.Caption = rst2!I14
Me.LI15.Caption = rst2!I15
Me.LI16.Caption = rst2!I16
Me.LI17.Caption = rst2!I17
Me.LI18.Caption = rst2!I18
Case "MF"
Me.YSR.Caption = "CR " & rst2!course_rating & vbCrLf & "SLOPE " & rst2!course_slope
If IsNull(rst2!D1) = False And rst2!D1 <> "" Then
Me.YD1.Caption = rst2!D1
Me.YD2.Caption = rst2!D2
Me.YD3.Caption = rst2!D3
Me.YD4.Caption = rst2!D4
Me.YD5.Caption = rst2!D5
Me.YD6.Caption = rst2!D6
Me.YD7.Caption = rst2!D7
Me.YD8.Caption = rst2!D8
Me.YD9.Caption = rst2!D9
Me.YDF.Caption = rst2!D1 + rst2!D2 + rst2!D3 + rst2!D4 + rst2!D5 + rst2!D6 + rst2!D7 + rst2!D8 + rst2!D9
Me.YDO.Caption = rst2!D1 + rst2!D2 + rst2!D3 + rst2!D4 + rst2!D5 + rst2!D6 + rst2!D7 + rst2!D8 + rst2!D9
Me.YD10.Caption = rst2!D10
Me.YD11.Caption = rst2!D11
Me.YD12.Caption = rst2!D12
Me.YD13.Caption = rst2!D13
Me.YD14.Caption = rst2!D14
Me.YD15.Caption = rst2!D15
Me.YD16.Caption = rst2!D16
Me.YD17.Caption = rst2!D17
Me.YD18.Caption = rst2!D18
Me.YDB.Caption = rst2!D10 + rst2!D11 + rst2!D12 + rst2!D13 + rst2!D14 + rst2!D15 + rst2!D16 + rst2!D17 + rst2!D18
Me.YDT.Caption = rst2!D1 + rst2!D2 + rst2!D3 + rst2!D4 + rst2!D5 + rst2!D6 + rst2!D7 + rst2!D8 + rst2!D9 + rst2!D10 + rst2!D11 + rst2!D12 + rst2!D13 + rst2!D14 + rst2!D15 + rst2!D16 + rst2!D17 + rst2!D18
End If
Me.GP1.Caption = rst2!P1
Me.GP2.Caption = rst2!P2
Me.GP3.Caption = rst2!P3
Me.GP4.Caption = rst2!P4
Me.GP5.Caption = rst2!P5
Me.GP6.Caption = rst2!P6
Me.GP7.Caption = rst2!P7
Me.GP8.Caption = rst2!P8
Me.GP9.Caption = rst2!P9
Me.GP10.Caption = rst2!P10
Me.GP11.Caption = rst2!P11
Me.GP12.Caption = rst2!P12
Me.GP13.Caption = rst2!P13
Me.GP14.Caption = rst2!P14
Me.GP15.Caption = rst2!P15
Me.GP16.Caption = rst2!P16
Me.GP17.Caption = rst2!P17
Me.GP18.Caption = rst2!P18
Me.GI1.Caption = rst2!I1
Me.GI2.Caption = rst2!I2
Me.GI3.Caption = rst2!I3
Me.GI4.Caption = rst2!I4
Me.GI5.Caption = rst2!I5
Me.GI6.Caption = rst2!I6
Me.GI7.Caption = rst2!I7
Me.GI8.Caption = rst2!I8
Me.GI9.Caption = rst2!I9
Me.GI10.Caption = rst2!I10
Me.GI11.Caption = rst2!I11
Me.GI12.Caption = rst2!I12
Me.GI13.Caption = rst2!I13
Me.GI14.Caption = rst2!I14
Me.GI15.Caption = rst2!I15
Me.GI16.Caption = rst2!I16
Me.GI17.Caption = rst2!I17
Me.GI18.Caption = rst2!I18
Me.LP1.Caption = rst2!P1
Me.LP2.Caption = rst2!P2
Me.LP3.Caption = rst2!P3
Me.LP4.Caption = rst2!P4
Me.LP5.Caption = rst2!P5
Me.LP6.Caption = rst2!P6
Me.LP7.Caption = rst2!P7
Me.LP8.Caption = rst2!P8
Me.LP9.Caption = rst2!P9
Me.LP10.Caption = rst2!P10
Me.LP11.Caption = rst2!P11
Me.LP12.Caption = rst2!P12
Me.LP13.Caption = rst2!P13
Me.LP14.Caption = rst2!P14
Me.LP15.Caption = rst2!P15
Me.LP16.Caption = rst2!P16
Me.LP17.Caption = rst2!P17
Me.LP18.Caption = rst2!P18
Me.LI1.Caption = rst2!I1
Me.LI2.Caption = rst2!I2
Me.LI3.Caption = rst2!I3
Me.LI4.Caption = rst2!I4
Me.LI5.Caption = rst2!I5
Me.LI6.Caption = rst2!I6
Me.LI7.Caption = rst2!I7
Me.LI8.Caption = rst2!I8
Me.LI9.Caption = rst2!I9
Me.LI10.Caption = rst2!I10
Me.LI11.Caption = rst2!I11
Me.LI12.Caption = rst2!I12
Me.LI13.Caption = rst2!I13
Me.LI14.Caption = rst2!I14
Me.LI15.Caption = rst2!I15
Me.LI16.Caption = rst2!I16
Me.LI17.Caption = rst2!I17
Me.LI18.Caption = rst2!I18
Case "LB"
If IsNull(rst2!D1) = False And rst2!D1 <> "" Then
Me.BD1.Caption = rst2!D1
Me.BD2.Caption = rst2!D2
Me.BD3.Caption = rst2!D3
Me.BD4.Caption = rst2!D4
Me.BD5.Caption = rst2!D5
Me.BD6.Caption = rst2!D6
Me.BD7.Caption = rst2!D7
Me.BD8.Caption = rst2!D8
Me.BD9.Caption = rst2!D9
Me.BDF.Caption = rst2!D1 + rst2!D2 + rst2!D3 + rst2!D4 + rst2!D5 + rst2!D6 + rst2!D7 + rst2!D8 + rst2!D9
Me.BDO.Caption = rst2!D1 + rst2!D2 + rst2!D3 + rst2!D4 + rst2!D5 + rst2!D6 + rst2!D7 + rst2!D8 + rst2!D9
Me.BD10.Caption = rst2!D10
Me.BD11.Caption = rst2!D11
Me.BD12.Caption = rst2!D12
Me.BD13.Caption = rst2!D13
Me.BD14.Caption = rst2!D14
Me.BD15.Caption = rst2!D15
Me.BD16.Caption = rst2!D16
Me.BD17.Caption = rst2!D17
Me.BD18.Caption = rst2!D18
Me.BDB.Caption = rst2!D10 + rst2!D11 + rst2!D12 + rst2!D13 + rst2!D14 + rst2!D15 + rst2!D16 + rst2!D17 + rst2!D18
Me.BDT.Caption = rst2!D1 + rst2!D2 + rst2!D3 + rst2!D4 + rst2!D5 + rst2!D6 + rst2!D7 + rst2!D8 + rst2!D9 + rst2!D10 + rst2!D11 + rst2!D12 + rst2!D13 + rst2!D14 + rst2!D15 + rst2!D16 + rst2!D17 + rst2!D18
End If
Me.BSR.Caption = "CR " & rst2!course_rating & vbCrLf & "SLOPE " & rst2!course_slope
Me.LP1.Caption = rst2!P1
Me.LP2.Caption = rst2!P2
Me.LP3.Caption = rst2!P3
Me.LP4.Caption = rst2!P4
Me.LP5.Caption = rst2!P5
Me.LP6.Caption = rst2!P6
Me.LP7.Caption = rst2!P7
Me.LP8.Caption = rst2!P8
Me.LP9.Caption = rst2!P9
Me.LP10.Caption = rst2!P10
Me.LP11.Caption = rst2!P11
Me.LP12.Caption = rst2!P12
Me.LP13.Caption = rst2!P13
Me.LP14.Caption = rst2!P14
Me.LP15.Caption = rst2!P15
Me.LP16.Caption = rst2!P16
Me.LP17.Caption = rst2!P17
Me.LP18.Caption = rst2!P18
Me.LI1.Caption = rst2!I1
Me.LI2.Caption = rst2!I2
Me.LI3.Caption = rst2!I3
Me.LI4.Caption = rst2!I4
Me.LI5.Caption = rst2!I5
Me.LI6.Caption = rst2!I6
Me.LI7.Caption = rst2!I7
Me.LI8.Caption = rst2!I8
Me.LI9.Caption = rst2!I9
Me.LI10.Caption = rst2!I10
Me.LI11.Caption = rst2!I11
Me.LI12.Caption = rst2!I12
Me.LI13.Caption = rst2!I13
Me.LI14.Caption = rst2!I14
Me.LI15.Caption = rst2!I15
Me.LI16.Caption = rst2!I16
Me.LI17.Caption = rst2!I17
Me.LI18.Caption = rst2!I18
Me.GP1.Caption = rst2!P1
Me.GP2.Caption = rst2!P2
Me.GP3.Caption = rst2!P3
Me.GP4.Caption = rst2!P4
Me.GP5.Caption = rst2!P5
Me.GP6.Caption = rst2!P6
Me.GP7.Caption = rst2!P7
Me.GP8.Caption = rst2!P8
Me.GP9.Caption = rst2!P9
Me.GP10.Caption = rst2!P10
Me.GP11.Caption = rst2!P11
Me.GP12.Caption = rst2!P12
Me.GP13.Caption = rst2!P13
Me.GP14.Caption = rst2!P14
Me.GP15.Caption = rst2!P15
Me.GP16.Caption = rst2!P16
Me.GP17.Caption = rst2!P17
Me.GP18.Caption = rst2!P18
Me.GI1.Caption = rst2!I1
Me.GI2.Caption = rst2!I2
Me.GI3.Caption = rst2!I3
Me.GI4.Caption = rst2!I4
Me.GI5.Caption = rst2!I5
Me.GI6.Caption = rst2!I6
Me.GI7.Caption = rst2!I7
Me.GI8.Caption = rst2!I8
Me.GI9.Caption = rst2!I9
Me.GI10.Caption = rst2!I10
Me.GI11.Caption = rst2!I11
Me.GI12.Caption = rst2!I12
Me.GI13.Caption = rst2!I13
Me.GI14.Caption = rst2!I14
Me.GI15.Caption = rst2!I15
Me.GI16.Caption = rst2!I16
Me.GI17.Caption = rst2!I17
Me.GI18.Caption = rst2!I18
Case "LF"
If IsNull(rst2!D1) = False And rst2!D1 <> "" Then
Me.RD1.Caption = rst2!D1
Me.RD2.Caption = rst2!D2
Me.RD3.Caption = rst2!D3
Me.RD4.Caption = rst2!D4
Me.RD5.Caption = rst2!D5
Me.RD6.Caption = rst2!D6
Me.RD7.Caption = rst2!D7
Me.RD8.Caption = rst2!D8
Me.RD9.Caption = rst2!D9
Me.RDF.Caption = rst2!D1 + rst2!D2 + rst2!D3 + rst2!D4 + rst2!D5 + rst2!D6 + rst2!D7 + rst2!D8 + rst2!D9
Me.RDO.Caption = rst2!D1 + rst2!D2 + rst2!D3 + rst2!D4 + rst2!D5 + rst2!D6 + rst2!D7 + rst2!D8 + rst2!D9
Me.RD10.Caption = rst2!D10
Me.RD11.Caption = rst2!D11
Me.RD12.Caption = rst2!D12
Me.RD13.Caption = rst2!D13
Me.RD14.Caption = rst2!D14
Me.RD15.Caption = rst2!D15
Me.RD16.Caption = rst2!D16
Me.RD17.Caption = rst2!D17
Me.RD18.Caption = rst2!D18
Me.RDB.Caption = rst2!D10 + rst2!D11 + rst2!D12 + rst2!D13 + rst2!D14 + rst2!D15 + rst2!D16 + rst2!D17 + rst2!D18
Me.RDT.Caption = rst2!D1 + rst2!D2 + rst2!D3 + rst2!D4 + rst2!D5 + rst2!D6 + rst2!D7 + rst2!D8 + rst2!D9 + rst2!D10 + rst2!D11 + rst2!D12 + rst2!D13 + rst2!D14 + rst2!D15 + rst2!D16 + rst2!D17 + rst2!D18
End If
Me.RSR.Caption = "CR " & rst2!course_rating & vbCrLf & "SLOPE " & rst2!course_slope
Me.LP1.Caption = rst2!P1
Me.LP2.Caption = rst2!P2
Me.LP3.Caption = rst2!P3
Me.LP4.Caption = rst2!P4
Me.LP5.Caption = rst2!P5
Me.LP6.Caption = rst2!P6
Me.LP7.Caption = rst2!P7
Me.LP8.Caption = rst2!P8
Me.LP9.Caption = rst2!P9
Me.LP10.Caption = rst2!P10
Me.LP11.Caption = rst2!P11
Me.LP12.Caption = rst2!P12
Me.LP13.Caption = rst2!P13
Me.LP14.Caption = rst2!P14
Me.LP15.Caption = rst2!P15
Me.LP16.Caption = rst2!P16
Me.LP17.Caption = rst2!P17
Me.LP18.Caption = rst2!P18
Me.LI1.Caption = rst2!I1
Me.LI2.Caption = rst2!I2
Me.LI3.Caption = rst2!I3
Me.LI4.Caption = rst2!I4
Me.LI5.Caption = rst2!I5
Me.LI6.Caption = rst2!I6
Me.LI7.Caption = rst2!I7
Me.LI8.Caption = rst2!I8
Me.LI9.Caption = rst2!I9
Me.LI10.Caption = rst2!I10
Me.LI11.Caption = rst2!I11
Me.LI12.Caption = rst2!I12
Me.LI13.Caption = rst2!I13
Me.LI14.Caption = rst2!I14
Me.LI15.Caption = rst2!I15
Me.LI16.Caption = rst2!I16
Me.LI17.Caption = rst2!I17
Me.LI18.Caption = rst2!I18
Me.GP1.Caption = rst2!P1
Me.GP2.Caption = rst2!P2
Me.GP3.Caption = rst2!P3
Me.GP4.Caption = rst2!P4
Me.GP5.Caption = rst2!P5
Me.GP6.Caption = rst2!P6
Me.GP7.Caption = rst2!P7
Me.GP8.Caption = rst2!P8
Me.GP9.Caption = rst2!P9
Me.GP10.Caption = rst2!P10
Me.GP11.Caption = rst2!P11
Me.GP12.Caption = rst2!P12
Me.GP13.Caption = rst2!P13
Me.GP14.Caption = rst2!P14
Me.GP15.Caption = rst2!P15
Me.GP16.Caption = rst2!P16
Me.GP17.Caption = rst2!P17
Me.GP18.Caption = rst2!P18
Me.GI1.Caption = rst2!I1
Me.GI2.Caption = rst2!I2
Me.GI3.Caption = rst2!I3
Me.GI4.Caption = rst2!I4
Me.GI5.Caption = rst2!I5
Me.GI6.Caption = rst2!I6
Me.GI7.Caption = rst2!I7
Me.GI8.Caption = rst2!I8
Me.GI9.Caption = rst2!I9
Me.GI10.Caption = rst2!I10
Me.GI11.Caption = rst2!I11
Me.GI12.Caption = rst2!I12
Me.GI13.Caption = rst2!I13
Me.GI14.Caption = rst2!I14
Me.GI15.Caption = rst2!I15
Me.GI16.Caption = rst2!I16
Me.GI17.Caption = rst2!I17
Me.GI18.Caption = rst2!I18
End Select
rst2.MoveNext
Loop
Me.competition.Caption = "COMPETITION COURSE " & crsbase
If Not (mode = "latest0") Then
Me.Event.Caption = "DATE: " & Format(rst!Event, "dd mmm yyyy")
Me.PlrA.Caption = "PLR A: " & rst!PlayerID
Me.PlrAHcp.Caption = rst!Handicap
Me.PlrAStrokes.Caption = rst!Playing_hcp
Me.A1.Caption = rst!S1
Me.A2.Caption = rst!S2
Me.A3.Caption = rst!S3
Me.A4.Caption = rst!S4
Me.A5.Caption = rst!S5
Me.A6.Caption = rst!S6
Me.A7.Caption = rst!S7
Me.A8.Caption = rst!S8
Me.A9.Caption = rst!S9
Me.A10.Caption = rst!S10
Me.A11.Caption = rst!S11
Me.A12.Caption = rst!S12
Me.A13.Caption = rst!S13
Me.A14.Caption = rst!S14
Me.A15.Caption = rst!S15
Me.A16.Caption = rst!S16
Me.A17.Caption = rst!S17
Me.A18.Caption = rst!S18
fs = CorrectScores(rst!S1, rst!Playing_hcp, rst!Par1, rst!I1) + CorrectScores(rst!S2, rst!Playing_hcp, rst!Par2, rst!I2) + CorrectScores(rst!S3, rst!Playing_hcp, rst!Par3, rst!I3) + CorrectScores(rst!S4, rst!Playing_hcp, rst!Par4, rst!I4) + CorrectScores(rst!S5, rst!Playing_hcp, rst!Par5, rst!I5) + CorrectScores(rst!S6, rst!Playing_hcp, rst!Par6, rst!I6) + CorrectScores(rst!S7, rst!Playing_hcp, rst!Par7, rst!I7) + CorrectScores(rst!S8, rst!Playing_hcp, rst!Par8, rst!I8) + CorrectScores(rst!S9, rst!Playing_hcp, rst!Par9, rst!I9)
Me.AF.Caption = fs
bs = CorrectScores(rst!S10, rst!Playing_hcp, rst!Par10, rst!I10) + CorrectScores(rst!S11, rst!Playing_hcp, rst!Par11, rst!I11) + CorrectScores(rst!S12, rst!Playing_hcp, rst!Par12, rst!I12) + CorrectScores(rst!S13, rst!Playing_hcp, rst!Par13, rst!I13) + CorrectScores(rst!S14, rst!Playing_hcp, rst!Par14, rst!I14) + CorrectScores(rst!S15, rst!Playing_hcp, rst!Par15, rst!I15) + CorrectScores(rst!S16, rst!Playing_hcp, rst!Par16, rst!I16) + CorrectScores(rst!S17, rst!Playing_hcp, rst!Par17, rst!I17) + CorrectScores(rst!S18, rst!Playing_hcp, rst!Par18, rst!I18)
Me.AB.Caption = bs
Me.AO.Caption = Me.AF.Caption
Me.AT.Caption = rst!Gross
Me.APts.Caption = rst!TotalPoints
rst.MoveNext
If Not (rst.EOF) Then
'Me.Event.Caption = Format(rst!Event, "dd mmm yyyy")
Me.PlrB.Caption = "PLR B: " & rst!PlayerID
Me.PlrBHcp.Caption = rst!Handicap
Me.PlrBStrokes.Caption = rst!Playing_hcp
Me.B1.Caption = rst!S1
Me.B2.Caption = rst!S2
Me.B3.Caption = rst!S3
Me.B4.Caption = rst!S4
Me.B5.Caption = rst!S5
Me.B6.Caption = rst!S6
Me.B7.Caption = rst!S7
Me.B8.Caption = rst!S8
Me.B9.Caption = rst!S9
Me.B10.Caption = rst!S10
Me.B11.Caption = rst!S11
Me.B12.Caption = rst!S12
Me.B13.Caption = rst!S13
Me.B14.Caption = rst!S14
Me.B15.Caption = rst!S15
Me.B16.Caption = rst!S16
Me.B17.Caption = rst!S17
Me.B18.Caption = rst!S18
fs = CorrectScores(rst!S1, rst!Playing_hcp, rst!Par1, rst!I1) + CorrectScores(rst!S2, rst!Playing_hcp, rst!Par2, rst!I2) + CorrectScores(rst!S3, rst!Playing_hcp, rst!Par3, rst!I3) + CorrectScores(rst!S4, rst!Playing_hcp, rst!Par4, rst!I4) + CorrectScores(rst!S5, rst!Playing_hcp, rst!Par5, rst!I5) + CorrectScores(rst!S6, rst!Playing_hcp, rst!Par6, rst!I6) + CorrectScores(rst!S7, rst!Playing_hcp, rst!Par7, rst!I7) + CorrectScores(rst!S8, rst!Playing_hcp, rst!Par8, rst!I8) + CorrectScores(rst!S9, rst!Playing_hcp, rst!Par9, rst!I9)
Me.BF.Caption = fs
bs = CorrectScores(rst!S10, rst!Playing_hcp, rst!Par10, rst!I10) + CorrectScores(rst!S11, rst!Playing_hcp, rst!Par11, rst!I11) + CorrectScores(rst!S12, rst!Playing_hcp, rst!Par12, rst!I12) + CorrectScores(rst!S13, rst!Playing_hcp, rst!Par13, rst!I13) + CorrectScores(rst!S14, rst!Playing_hcp, rst!Par14, rst!I14) + CorrectScores(rst!S15, rst!Playing_hcp, rst!Par15, rst!I15) + CorrectScores(rst!S16, rst!Playing_hcp, rst!Par16, rst!I16) + CorrectScores(rst!S17, rst!Playing_hcp, rst!Par17, rst!I17) + CorrectScores(rst!S18, rst!Playing_hcp, rst!Par18, rst!I18)
Me.BB.Caption = bs
Me.BO.Caption = Me.BF.Caption
Me.BT.Caption = rst!Gross
Me.BPts.Caption = rst!TotalPoints
rst.MoveNext
End If
If Not (rst.EOF) Then
Me.PlrC.Caption = "PLR C: " & rst!PlayerID
Me.PlrCHcp.Caption = rst!Handicap
Me.PlrCStrokes.Caption = rst!Playing_hcp
Me.C1.Caption = rst!S1
Me.C2.Caption = rst!S2
Me.C3.Caption = rst!S3
Me.C4.Caption = rst!S4
Me.C5.Caption = rst!S5
Me.C6.Caption = rst!S6
Me.C7.Caption = rst!S7
Me.C8.Caption = rst!S8
Me.C9.Caption = rst!S9
Me.C10.Caption = rst!S10
Me.C11.Caption = rst!S11
Me.C12.Caption = rst!S12
Me.C13.Caption = rst!S13
Me.C14.Caption = rst!S14
Me.C15.Caption = rst!S15
Me.C16.Caption = rst!S16
Me.C17.Caption = rst!S17
Me.C18.Caption = rst!S18
fs = CorrectScores(rst!S1, rst!Playing_hcp, rst!Par1, rst!I1) + CorrectScores(rst!S2, rst!Playing_hcp, rst!Par2, rst!I2) + CorrectScores(rst!S3, rst!Playing_hcp, rst!Par3, rst!I3) + CorrectScores(rst!S4, rst!Playing_hcp, rst!Par4, rst!I4) + CorrectScores(rst!S5, rst!Playing_hcp, rst!Par5, rst!I5) + CorrectScores(rst!S6, rst!Playing_hcp, rst!Par6, rst!I6) + CorrectScores(rst!S7, rst!Playing_hcp, rst!Par7, rst!I7) + CorrectScores(rst!S8, rst!Playing_hcp, rst!Par8, rst!I8) + CorrectScores(rst!S9, rst!Playing_hcp, rst!Par9, rst!I9)
Me.CF.Caption = fs
bs = CorrectScores(rst!S10, rst!Playing_hcp, rst!Par10, rst!I10) + CorrectScores(rst!S11, rst!Playing_hcp, rst!Par11, rst!I11) + CorrectScores(rst!S12, rst!Playing_hcp, rst!Par12, rst!I12) + CorrectScores(rst!S13, rst!Playing_hcp, rst!Par13, rst!I13) + CorrectScores(rst!S14, rst!Playing_hcp, rst!Par14, rst!I14) + CorrectScores(rst!S15, rst!Playing_hcp, rst!Par15, rst!I15) + CorrectScores(rst!S16, rst!Playing_hcp, rst!Par16, rst!I16) + CorrectScores(rst!S17, rst!Playing_hcp, rst!Par17, rst!I17) + CorrectScores(rst!S18, rst!Playing_hcp, rst!Par18, rst!I18)
Me.CB.Caption = bs
Me.CO.Caption = Me.CF.Caption
Me.CT.Caption = rst!Gross
Me.CPts.Caption = rst!TotalPoints
rst.MoveNext
End If
If Not (rst.EOF) Then
Me.Mkr.Caption = "MKR: " & rst!PlayerID
Me.MkrHcp.Caption = rst!Handicap
Me.MkrStrokes.Caption = rst!Playing_hcp
Me.Mkr1.Caption = rst!S1
Me.Mkr2.Caption = rst!S2
Me.Mkr3.Caption = rst!S3
Me.Mkr4.Caption = rst!S4
Me.Mkr5.Caption = rst!S5
Me.Mkr6.Caption = rst!S6
Me.Mkr7.Caption = rst!S7
Me.Mkr8.Caption = rst!S8
Me.Mkr9.Caption = rst!S9
Me.Mkr10.Caption = rst!S10
Me.Mkr11.Caption = rst!S11
Me.Mkr12.Caption = rst!S12
Me.Mkr13.Caption = rst!S13
Me.Mkr14.Caption = rst!S14
Me.Mkr15.Caption = rst!S15
Me.Mkr16.Caption = rst!S16
Me.Mkr17.Caption = rst!S17
Me.Mkr18.Caption = rst!S18
fs = CorrectScores(rst!S1, rst!Playing_hcp, rst!Par1, rst!I1) + CorrectScores(rst!S2, rst!Playing_hcp, rst!Par2, rst!I2) + CorrectScores(rst!S3, rst!Playing_hcp, rst!Par3, rst!I3) + CorrectScores(rst!S4, rst!Playing_hcp, rst!Par4, rst!I4) + CorrectScores(rst!S5, rst!Playing_hcp, rst!Par5, rst!I5) + CorrectScores(rst!S6, rst!Playing_hcp, rst!Par6, rst!I6) + CorrectScores(rst!S7, rst!Playing_hcp, rst!Par7, rst!I7) + CorrectScores(rst!S8, rst!Playing_hcp, rst!Par8, rst!I8) + CorrectScores(rst!S9, rst!Playing_hcp, rst!Par9, rst!I9)
Me.MkrF.Caption = fs
bs = CorrectScores(rst!S10, rst!Playing_hcp, rst!Par10, rst!I10) + CorrectScores(rst!S11, rst!Playing_hcp, rst!Par11, rst!I11) + CorrectScores(rst!S12, rst!Playing_hcp, rst!Par12, rst!I12) + CorrectScores(rst!S13, rst!Playing_hcp, rst!Par13, rst!I13) + CorrectScores(rst!S14, rst!Playing_hcp, rst!Par14, rst!I14) + CorrectScores(rst!S15, rst!Playing_hcp, rst!Par15, rst!I15) + CorrectScores(rst!S16, rst!Playing_hcp, rst!Par16, rst!I16) + CorrectScores(rst!S17, rst!Playing_hcp, rst!Par17, rst!I17) + CorrectScores(rst!S18, rst!Playing_hcp, rst!Par18, rst!I18)
Me.MkrB.Caption = bs
Me.MkrO.Caption = Me.MkrF.Caption
Me.MkrT.Caption = rst!Gross
Me.MkrPts.Caption = rst!TotalPoints
rst.MoveNext
End If
End If
End Sub