1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| Private Sub RefreshQuery()
Dim SQL As String
Dim SQLWhere As String
SQL = "SELECT Concessionnum, dateréservation, durée, Type FROM concession Where Concession!ConcessionNum <> 0 "
If Numéroconcession.Value Then
SQL = SQL & "And Concession!ConcessionNum like '*" & Numéroconcession & "*' "
End If
If Duréeréservation.Value Then
SQL = SQL & "And Concession!Dateréservation = '" & Duréeréservation & "' "
End If
SQLWhere = Trim(Right(SQL, Len(SQL) - InStr(SQL, "Where ") - Len("Where ") + 1))
SQL = SQL & ";"
Me.lblStats.Caption = DCount("*", "Concession", SQLWhere) & " / " & DCount("*", "Concession")
Me.Numéroconcession.Requery
End Sub |
Partager