Bonjour
je cherche pour l'instant à rechercher dans une table un enregistrement
avec une double condition. J'ai une erreur de syntaxe à l'éxécution (3077)
je pense que je me suis loupé dans la syntaxe
merci d'avance pour votre aide
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 Sub cherche() ' ------------------------------------------------------- ' - TEST ' ------------------------------------------------------- Dim rstStock As DAO.Recordset Dim R As Integer Dim E As String Set rstStock = CurrentDb.OpenRecordset("T_STOCK", dbOpenDynaset) R = Forms!F_SALARIE.Form!SF_EQUIPSAL!REF_ARTICLE E = Forms!F_SALARIE.Form!SF_EQUIPSAL!ETAT rstStock.FindFirst "[REF_ARTICLE] = ' & R & ' AND [REF_ARTICLE] = " '& E &'" If rstStock.NoMatch Then MsgBox ("nada") Else MsgBox ("oui") End If End Sub
Partager