1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| Public Sub RefreshListePreventives()
Dim leSQL As String
Dim leWhere As String
leWhere = " DatePreventive between #" & Format(Nz(Me!DateDebut, #1/1/1000#), "mm/dd/yyyy") & "# and #" & Format(Nz(Me!DateFin, #1/1/4000#), "mm/dd/yyyy") & "#"
If (Nz(Me.ParamNomClient, "") <> "") And (Me.ParamNomClient <> "[Tous]") Then
leWhere = leWhere & " and ([NomClient] like '" & Me.ParamNomClient & "')"
Else
Me.ParamNomClient = "[Tous]"
End If
leSQL = "Select * From R_ListePreventives where" & leWhere & " order by [DatePreventive] asc;"
Me.SF_ListeEquipement.Form.RecordSource = leSQL
End Sub |
Partager