Alrighty,
Basically what I have is a database that I am using to keep track of an offline Fantasy Football draft. I have a form that sorts the teams ascending when the number of the draft round is odd (such as Round 1, Round 3, etc...) and it sorts descending when the round is even. My reasoning is whoever ends the first round, starts the second round. Like I said, my form works perfectly, but when I try to run a report, the same logic doesn't work quite so well. Here is the code that I have on my form:
Private Sub Form_Current()
Me.OrderByOn = True
If Me.MOD = 1 Then
Me.OrderBy = "DraftOrder"
Else
Me.OrderBy = "DraftOrder DESC"
End If
End Sub
What's happening here is the control [MOD] is basically the draft round Mod 2. For those of you that don't know, Mod is a function that stores the remainder. Since my variable is an integer, if a 0 gets returned, that means the round is even and if it returns a 1, the round is odd.
I would like to know if I can sort the detail section of my form this same way.
Thanks,
TOTCOM11
Basically what I have is a database that I am using to keep track of an offline Fantasy Football draft. I have a form that sorts the teams ascending when the number of the draft round is odd (such as Round 1, Round 3, etc...) and it sorts descending when the round is even. My reasoning is whoever ends the first round, starts the second round. Like I said, my form works perfectly, but when I try to run a report, the same logic doesn't work quite so well. Here is the code that I have on my form:
Private Sub Form_Current()
Me.OrderByOn = True
If Me.MOD = 1 Then
Me.OrderBy = "DraftOrder"
Else
Me.OrderBy = "DraftOrder DESC"
End If
End Sub
What's happening here is the control [MOD] is basically the draft round Mod 2. For those of you that don't know, Mod is a function that stores the remainder. Since my variable is an integer, if a 0 gets returned, that means the round is even and if it returns a 1, the round is odd.
I would like to know if I can sort the detail section of my form this same way.
Thanks,
TOTCOM11