waxdart23
Registered User.
- Local time
- Today, 06:03
- Joined
- Nov 20, 2002
- Messages
- 25
In a rostering database, I am using the following to list "Stewards" who are available to work (in a venue for a performance). These are displayed in an unbound text box called lstSteward.
Is there any way of counting each "Steward" available for work and displaying it on the form (maybe in a text box called "totSteward" for example).
PHP:
Private Sub cmbPerformance_AfterUpdate()
If IsNull(cmbPerformance) Then
lstSteward.RowSource = ""
lstSteward.Requery
Else
Dim strSQL As String
strSQL = "SELECT StewardAvailability.Perf_ID, StewardDetails.First_Name, " _
& "StewardDetails.Last_Name, StewardAvailability.Availability FROM StewardDetails " _
& "INNER JOIN StewardAvailability ON StewardDetails.ID = StewardAvailability.Stewards_ID " _
& "WHERE StewardAvailability.Perf_ID = " & cmbPerformance & " AND StewardAvailability" _
& ".Availability = TRUE;"
lstSteward.RowSourceType = "Table/Query"
lstSteward.RowSource = strSQL
lstSteward.Requery
End If
End Sub
Is there any way of counting each "Steward" available for work and displaying it on the form (maybe in a text box called "totSteward" for example).