Bonjour,
Dans un formulaire j'ai créer un filtre avec multi-criteres :
Mais je n'arrive pas a le finir :
Voici mes champs :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37 Private Sub CmdFiltre_Click() f = "" If Not IsNull(Me.Rarticle) And Me.Rarticle <> "" Then f = "ARTICLE LIKE ""*" & Me.Rarticle & "*""" End If If Not IsNull(Me.Rof) And Me.Rof <> "" Then If f <> "" Then f = f & " AND N°of LIKE ""*" & Me.Rof & "*""" Else f = "N°of LIKE ""*" & Me.Rof & "*""" End If End If If Not IsNull(Me.Rserie) And Me.Rserie <> "" Then If f <> "" Then f = f & " AND IdentificationN°Serie LIKE ""*" & Me.Rserie & "*""" Else f = "IdentificationN°Serie LIKE ""*" & Me.Rserie & "*""" End If End If If Not IsNull(Me.Rbl) And Me.Rbl <> "" Then If f <> "" Then f = f & " AND N°BL LIKE ""*" & Me.Rbl & "*""" Else f = "N°BL LIKE ""*" & Me.Rbl & "*""" End If End If If Not IsNull(Me.Rdate1) And Me.Rdate1 <> "" And Not IsNull(Me.Rdate2) And Me.Rdate2 <> "" Then If f <> "" Then f = f & " AND clng([date_saisie]) BETWEEN " & CLng(Me.Rdate1) & " AND " & CLng(Me.Rdate2) & "" Else f = "clng([date_saisie]) BETWEEN " & CLng(Me.Rdate1) & " AND " & CLng(Me.Rdate2) & "" End If End If Me.Filter = f Me.FilterOn = True
ARTICLE
N°of
N°serie
IdentificationN°Serie
date_saisie.
Mon problème c'est les dates ne fonctionne pas, j'ai un message d'erreur quant les dates sont renseignées ; 94 utilisation incorrecte de Null
Merci de votre aide
Partager