Skip to content

Commit

Permalink
- Competitor export for Meet Manager Swimming. Can now generate a RE1…
Browse files Browse the repository at this point in the history
… Registration file for import into Meet Manager Swimming.

- Meet Manager T&F competitor only export was including duplicates.
  • Loading branch information
ruddj committed May 5, 2017
1 parent 26461ae commit a2f05dc
Show file tree
Hide file tree
Showing 39 changed files with 575 additions and 196 deletions.
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [5.1.1] - 2017-05-05
### Added
- Competitor export for Meet Manager Swimming. Can now generate a RE1 Registration file for import into Meet Manager Swimming.

### Fixed
- Meet Manager T&F competitor only export was including duplicates.

## [5.1.0] - 2017-05-04
### Added
- Meet Manager Export.
- Meet Manager Export. Can now generate a semicolon delimited file for import into Meet Manager Track and Field.

### Changed
- Database Schema of Carnival files modified to add Meet Manager Mappings.
Expand Down Expand Up @@ -165,7 +172,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Ordered Competitors handled differently: Table held locally. Does not delete old but overwrites them.


[Unreleased]: https://github.com/ruddj/SportsAdmin/compare/v5.0.2...HEAD
[Unreleased]: https://github.com/ruddj/SportsAdmin/compare/v5.1.0...HEAD
[5.1.0]: https://github.com/ruddj/SportsAdmin/compare/v5.0.2...v5.1.0
[5.0.2]: https://github.com/ruddj/SportsAdmin/compare/v5.0.1...v5.0.2
[5.0.1]: https://github.com/ruddj/SportsAdmin/compare/v5.0.0...v5.0.1
Expand Down
6 changes: 3 additions & 3 deletions Source/forms/CompEventsSummary.bas
Original file line number Diff line number Diff line change
Expand Up @@ -1165,7 +1165,7 @@ On Error GoTo Err_PromoteBut_Click
ReturnValue = SysCmd(acSysCmdInitMeter, "Promoting Competitors", TotalEvents) ' Display message in status bar.

Rs.MoveFirst
X = 1
x = 1

DoCmd.SetWarnings False
DoCmd.RunSQL "UPDATE DISTINCTROW ShowDialog SET ShowDialog.ShowDialog = Yes"
Expand Down Expand Up @@ -1197,8 +1197,8 @@ On Error GoTo Err_PromoteBut_Click
If Result = True Then
EventsPromoted = True
End If
ReturnValue = SysCmd(acSysCmdUpdateMeter, X) ' Update meter.
X = X + 1
ReturnValue = SysCmd(acSysCmdUpdateMeter, x) ' Update meter.
x = x + 1
End If
End If
Rs.MoveNext
Expand Down
8 changes: 4 additions & 4 deletions Source/forms/Competitors.bas
Original file line number Diff line number Diff line change
Expand Up @@ -736,12 +736,12 @@ Private Sub Age_BeforeUpdate(Cancel As Integer)
Dim MyDb As Database

OriginalValue = Forms![Competitors]![Age].OldValue
X = Forms![Competitors]![Age]
x = Forms![Competitors]![Age]

If IsNull(X) Then
If IsNull(x) Then
Response = MsgBox("You must enter a value for the competitors age", vbInformation)

ElseIf Trim(str(Val(X))) <> Trim(X) Then
ElseIf Trim(str(Val(x))) <> Trim(x) Then
Response = MsgBox("The age must be numeric.", vbInformation)
Else
If Not (IsNull(OriginalValue)) Then '**** ie not the first entry
Expand Down Expand Up @@ -892,7 +892,7 @@ Private Sub Field66_BeforeUpdate(Cancel As Integer)
Dim MyDb As Database

OriginalValue = Forms![Competitors]![Age].OldValue
X = Forms![Competitors]![Age]
x = Forms![Competitors]![Age]

If Not (IsNull(OriginalValue)) Then '**** ie not the first entry

Expand Down
2 changes: 1 addition & 1 deletion Source/forms/CompetitorsSummary.bas
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,6 @@ Private Sub ScrollSummary()

End Sub

Private Sub Summary_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Private Sub Summary_MouseUp(Button As Integer, Shift As Integer, x As Single, Y As Single)
strSearch = ""
End Sub
8 changes: 4 additions & 4 deletions Source/forms/CopyCompetitorsBetweenEvents.bas
Original file line number Diff line number Diff line change
Expand Up @@ -459,14 +459,14 @@ On Error GoTo Err_CopyCompetitors_Click
End If
Frs.FindFirst Fcriteria

X = 0
x = 0
FailedI = 0
SuccessI = 0

While Not Frs.NoMatch

Retval = SysCmd(SYSCMD_SETSTATUS, "Processing competitor " & X)
X = X + 1
Retval = SysCmd(SYSCMD_SETSTATUS, "Processing competitor " & x)
x = x + 1

NewE_Code = DLookup("[E_Code]", "Events", "[ET_Code]=" & Me!ToET_Code & " AND [Sex]=""" & Frs![Sex] & """ AND [Age]=""" & Frs![Age] & """")
If IsNull(NewE_Code) Then
Expand Down Expand Up @@ -503,7 +503,7 @@ On Error GoTo Err_CopyCompetitors_Click
Trs.Close
msg = "Copy complete. " & SuccessI & " competitors copied."
If FailedI > 0 Then
msg = msg & " However " & FailedI & " of " & X & " heats could not be processed because the TO heat did not exist."
msg = msg & " However " & FailedI & " of " & x & " heats could not be processed because the TO heat did not exist."
End If
Response = MsgBox(msg, vbInformation)

Expand Down
2 changes: 1 addition & 1 deletion Source/forms/Enter Competitors Subform1.bas
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ Dim ShowAllCompetitors As Variant

Private Sub Fname_BeforeUpdate(Cancel As Integer)

X = 1
x = 1

End Sub

Expand Down
12 changes: 6 additions & 6 deletions Source/forms/EnterCompetitors.bas
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ Private Sub EnterResultsInPlaceOrderBut_Click()
On Error GoTo EnterResultsInPlaceOrderBut_Click_Err

Dim Criteria As String, db As Database, Rs As Recordset
Dim MyDb As Database, MySet As Recordset, Q As Variant, X As Variant, i As Variant, Place As Variant, Lane As Variant
Dim MyDb As Database, MySet As Recordset, Q As Variant, x As Variant, i As Variant, Place As Variant, Lane As Variant
Dim NewTitle As String, Criteria1 As Variant, ECrs As Recordset
Dim success As Boolean

Expand All @@ -1138,9 +1138,9 @@ On Error GoTo EnterResultsInPlaceOrderBut_Click_Err

'Stop

X = Me![EC_Subform].Form![Count]
x = Me![EC_Subform].Form![Count]

If X >= 1 Then
If x >= 1 Then

Q = "DELETE DISTINCTROW [Temporary Results-Place Order].Place FROM [Temporary Results-Place Order]"
DoCmd.SetWarnings False
Expand Down Expand Up @@ -1235,10 +1235,10 @@ End Sub

Private Sub Button47_Click()

Dim X As Variant
Dim x As Variant

X = DCount("[ET_Code]", "Ent_Comp_Filter")
If X < 1 Then
x = DCount("[ET_Code]", "Ent_Comp_Filter")
If x < 1 Then
MsgBox ("No events match the given criteria.")
Else
DoCmd.RunMacro "ApplyFilter"
Expand Down
8 changes: 4 additions & 4 deletions Source/forms/EnterCompetitorsAuto.bas
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ Private Sub AddCompet_Click()
Dim TotalHouses As Variant, NumOfLanes As Variant, FLev As Variant, CriteriaHeat As Variant
Dim CreateHeat As Variant, PointScale As Variant, ProType As Variant, UseTimes As Variant
Dim Criteria As Variant, Continue As Variant, i As Variant, HouseIndex As Variant, CompLane As Variant
Dim MoreCompetitors As Variant, ReturnValue As Variant, X As Variant, TotalCompetitors As Variant
Dim MoreCompetitors As Variant, ReturnValue As Variant, x As Variant, TotalCompetitors As Variant
Dim CErs As Recordset
Dim HC() As HouseComp

Expand Down Expand Up @@ -496,12 +496,12 @@ Private Sub AddCompet_Click()
Crs.FindFirst Criteria
Continue = True
ReturnValue = SysCmd(acSysCmdInitMeter, "Adding Competitors to heat ...", TotalCompetitors)
X = 0
x = 0
While Not Crs.NoMatch And Continue ' This is the beggining of a new heat
' If there are still competitors then we want to add a new heat
' It will stop when a whole heat is left empty

ReturnValue = SysCmd(acSysCmdUpdateMeter, X)
ReturnValue = SysCmd(acSysCmdUpdateMeter, x)
Continue = False
i = 1 'DCount("[F_Lev]", "CompEvents", "[E_Code]=" & ERS!E_Code & " AND [F_Lev]=" & Flev & " AND [Heat]=" & HeatRS!Heat) + 1
MoreCompetitors = True
Expand All @@ -515,7 +515,7 @@ Private Sub AddCompet_Click()
Crs.FindFirst Criteria
If Not Crs.NoMatch Then
MoreCompetitors = True
X = X + 1
x = x + 1
If CreateHeat Then
'Stop
HeatRS.AddNew
Expand Down
4 changes: 2 additions & 2 deletions Source/forms/EventType.bas
Original file line number Diff line number Diff line change
Expand Up @@ -908,9 +908,9 @@ On Error GoTo Err_Close_But_Click
'Stop
Cl = True

X = DCount("[ET_Code]", "Lane Promotion Allocation", "[ET_Code]=" & Me![ET_Code])
x = DCount("[ET_Code]", "Lane Promotion Allocation", "[ET_Code]=" & Me![ET_Code])

If X < Forms![EventType]![Lane_Cnt] And DCount("[ET_Code]", "EventTypeHeats", "[ET_Code]=" & Me![ET_Code] & " AND [F_Lev]>0") Then
If x < Forms![EventType]![Lane_Cnt] And DCount("[ET_Code]", "EventTypeHeats", "[ET_Code]=" & Me![ET_Code] & " AND [F_Lev]>0") Then
Response = MsgBox("The number of promotion lanes you have set up is less than the Lane / Competitor count. Do you still wish to continue?", vbYesNo + vbQuestion, "Too few lanes?")
If Response <> vbYes Then
Cl = False
Expand Down
6 changes: 3 additions & 3 deletions Source/forms/EventTypeSummary.bas
Original file line number Diff line number Diff line change
Expand Up @@ -447,14 +447,14 @@ On Error GoTo UpdateRecords_Click_Err
Tot = Rs.RecordCount
msg = "Updating Event Records ..."
ReturnValue = SysCmd(acSysCmdInitMeter, msg, Tot) ' Display message in status bar.
X = 1
x = 1

Rs.MoveFirst
While Not Rs.EOF
Call CheckIfRecordBroken(Rs!E_Code, -1, -1)
Rs.MoveNext
ReturnValue = SysCmd(acSysCmdUpdateMeter, X) ' Update meter.
X = X + 1
ReturnValue = SysCmd(acSysCmdUpdateMeter, x) ' Update meter.
x = x + 1
Wend

Rs.Close
Expand Down
4 changes: 2 additions & 2 deletions Source/forms/Import Competitors.bas
Original file line number Diff line number Diff line change
Expand Up @@ -619,8 +619,8 @@ Private Sub ImportData_Click()
ReturnValue = SysCmd(acSysCmdInitMeter, msg, DCount("[Gname]", "Import Competitors")) ' Display message in status bar.

While Not ITRS.EOF And Continue
X = X + 1
ReturnValue = SysCmd(acSysCmdUpdateMeter, X) ' Update meter.
x = x + 1
ReturnValue = SysCmd(acSysCmdUpdateMeter, x) ' Update meter.

Cname = ITRS!Gname & " " & ITRS!Sname & " (" & UCase(ITRS!H_Code) & ")"
Response = 0
Expand Down
6 changes: 3 additions & 3 deletions Source/forms/Import Data.bas
Original file line number Diff line number Diff line change
Expand Up @@ -577,12 +577,12 @@ On Error GoTo Err_ImportData_Click
msg = "Processing competitor ... "
'ReturnValue = SysCmd(acSysCmdInitMeter, Msg, DCount("[HE_Code]", "ImportData")) ' Display message in status bar.
ReturnValue = SysCmd(acSysCmdSetStatus, msg)
X = 0
x = 0

While Not ITRS.EOF And Continue
X = X + 1
x = x + 1
'ReturnValue = SysCmd(acSysCmdUpdateMeter, X) ' Update meter.
ReturnValue = ReturnValue = SysCmd(acSysCmdSetStatus, msg & X)
ReturnValue = ReturnValue = SysCmd(acSysCmdSetStatus, msg & x)
ActualSex = DetermineSex(ITRS!Sex)

If IsNull(ITRS!G_name) Or IsNull(ITRS!S_name) Then
Expand Down
8 changes: 4 additions & 4 deletions Source/forms/Lane Promotion Allocation.bas
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,9 @@ Option Compare Database 'Use database order for string comparisons
Private Sub Close_But_Click()
On Error GoTo Err_Close_But_Click

X = DCount("[ET_Code]", "Lane Promotion Allocation", "[ET_Code]=" & Me![ET_Code])
x = DCount("[ET_Code]", "Lane Promotion Allocation", "[ET_Code]=" & Me![ET_Code])

If X < Forms![EventType]![Lane_Cnt] Then
If x < Forms![EventType]![Lane_Cnt] Then
Response = MsgBox("The number of lanes you have set up is less than the Lane / Competitor count specified on the previous form. Do you still wish to continue?", vbYesNo + vbQuestion, "Too few lanes?")
If Response = vbYes Then
DoCmd.Close
Expand All @@ -318,7 +318,7 @@ Private Sub Form_Load()

End Sub

Private Sub Lane_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Private Sub Lane_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single)

Q = "SELECT DISTINCTROW [Lane Promotion Allocation].ET_Code, [Lane Promotion Allocation].Place, [Lane Promotion Allocation].Lane "
Q = Q & "FROM [Lane Promotion Allocation] "
Expand All @@ -330,7 +330,7 @@ Private Sub Lane_MouseDown(Button As Integer, Shift As Integer, X As Single, Y A

End Sub

Private Sub Place_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Private Sub Place_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single)

Q = "SELECT DISTINCTROW [Lane Promotion Allocation].ET_Code, [Lane Promotion Allocation].Place, [Lane Promotion Allocation].Lane "
Q = Q & "FROM [Lane Promotion Allocation] "
Expand Down
6 changes: 3 additions & 3 deletions Source/forms/Lanes.bas
Original file line number Diff line number Diff line change
Expand Up @@ -357,16 +357,16 @@ Private Sub Update_Click()

msg = "Updating Lanes ... "
ReturnValue = SysCmd(acSysCmdInitMeter, msg, DCount("[E_Code]", "Heats")) ' Display message in status bar.
X = 0
x = 0

If Not Rs.BOF Then

Rs.MoveFirst

Do Until Rs.EOF
Call Update_Lane_Assignments(Rs!E_Code, Rs!F_Lev, Rs!Heat)
X = X + 1
ReturnValue = SysCmd(acSysCmdUpdateMeter, X) ' Update meter.
x = x + 1
ReturnValue = SysCmd(acSysCmdUpdateMeter, x) ' Update meter.

Rs.MoveNext
Loop
Expand Down
4 changes: 2 additions & 2 deletions Source/forms/ReportsPopUp-SF.bas
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ Private Sub PositionForm()

On Error GoTo PositionForm_Exit

Dim X As Integer, Y As Integer
Dim x As Integer, Y As Integer

If VarEmpty(Me!ReportPopupX) Then
Me!ReportPopupX = 0
Expand All @@ -242,7 +242,7 @@ On Error GoTo PositionForm_Exit
End If
End If

X = Me!ReportPopupX
x = Me!ReportPopupX

If VarEmpty(Me!ReportPopupY) Then
Me!ReportPopupY = 0
Expand Down
24 changes: 12 additions & 12 deletions Source/forms/ReportsPopUp.bas
Original file line number Diff line number Diff line change
Expand Up @@ -489,13 +489,13 @@ Private Sub CloseAllReportsBut_Click()
On Error Resume Next

'DoCmd.Echo False
Dim X As Integer
Dim x As Integer

For X = 0 To Reports.Count - 1
For x = 0 To Reports.Count - 1
DoCmd.SelectObject A_REPORT, Reports(0).Name, False
DoCmd.Close

Next X
Next x

'DoCmd.Echo True

Expand Down Expand Up @@ -565,27 +565,27 @@ End Sub
Private Sub PrintAllReportsBut_Click()

On Error GoTo PrintAllReportsBut_Click_Err
Dim X As Integer, msg As String
Dim x As Integer, msg As String

For X = 0 To Reports.Count - 1
DoCmd.SelectObject A_REPORT, Reports(X).Name, False
For x = 0 To Reports.Count - 1
DoCmd.SelectObject A_REPORT, Reports(x).Name, False
DoCmd.RunCommand acCmdPrint
Next X
Next x

PrintAllReportsBut_Click_Exit:
Exit Sub

PrintAllReportsBut_Click_Err:
msg = ""
If (Err.Number = 2501) Then
If (X < (Reports.Count - 1)) Then
If (x < (Reports.Count - 1)) Then
msg = "You have cancelled printing report '"
End If
Else
msg = "An error has occured printing '"
End If
If msg <> "" Then
Response = MsgBox(msg & Reports(X).Caption & "'. Do you wish to continue printing?", vbInformation + vbYesNo)
Response = MsgBox(msg & Reports(x).Caption & "'. Do you wish to continue printing?", vbInformation + vbYesNo)
If Response = vbNo Then
Exit Sub
Else
Expand Down Expand Up @@ -691,7 +691,7 @@ Private Sub PositionForm()

On Error GoTo PositionForm_Exit

Dim X As Integer, Y As Integer
Dim x As Integer, Y As Integer

If VarEmpty(Me!ReportPopupX) Then
Me!ReportPopupX = 0
Expand All @@ -703,7 +703,7 @@ On Error GoTo PositionForm_Exit
End If
End If

X = Me!ReportPopupX
x = Me!ReportPopupX

If VarEmpty(Me!ReportPopupY) Then
Me!ReportPopupY = 0
Expand All @@ -716,7 +716,7 @@ On Error GoTo PositionForm_Exit
End If
Y = Me!ReportPopupY

DoCmd.MoveSize X, Y
DoCmd.MoveSize x, Y

PositionForm_Exit:

Expand Down
Loading

0 comments on commit a2f05dc

Please sign in to comment.