C
CJ
Hi Groupies
I have never used the Select Case statement before and am having a little
trouble.
I have the Select Case code attached to a command button on a form. When I
push the button, the code runs for the selected record only. How do I make
it run for all of the records in the recordset?
Here is some of the code:
Private Sub cmdAutoFlight_Click()
Dim Rank As Integer, Flight As String, Saturday_Tee_Time As Date
Select Case Rank
Case Is <= 16
Me.Flight = "Championship"
Me.Saturday_Tee_Time = "1:00:00 PM"
Case Is <= 32
Me.Flight = "1"
Me.Saturday_Tee_Time = "1:00:00 PM"
Case Is <= 48
Me.Flight = "2"
Me.Saturday_Tee_Time = "1:00:00 PM"
<snip>
Case Else
Me.Flight = "16"
Me.Saturday_Tee_Time = "7:00:00 AM"
End Select
End Sub
I have never used the Select Case statement before and am having a little
trouble.
I have the Select Case code attached to a command button on a form. When I
push the button, the code runs for the selected record only. How do I make
it run for all of the records in the recordset?
Here is some of the code:
Private Sub cmdAutoFlight_Click()
Dim Rank As Integer, Flight As String, Saturday_Tee_Time As Date
Select Case Rank
Case Is <= 16
Me.Flight = "Championship"
Me.Saturday_Tee_Time = "1:00:00 PM"
Case Is <= 32
Me.Flight = "1"
Me.Saturday_Tee_Time = "1:00:00 PM"
Case Is <= 48
Me.Flight = "2"
Me.Saturday_Tee_Time = "1:00:00 PM"
<snip>
Case Else
Me.Flight = "16"
Me.Saturday_Tee_Time = "7:00:00 AM"
End Select
End Sub