{Access} problème de requête - Page 2
Résolu
Précédent
- 1
- 2
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
SAlut,
le signe différent de en ACCESS c'est sa ===> <>
et est-ce que tu peux me mettre le code de ton bouton car je suis perdu sans matière...Merci
le signe différent de en ACCESS c'est sa ===> <>
et est-ce que tu peux me mettre le code de ton bouton car je suis perdu sans matière...Merci
Private Sub btnVerification_Click()
Dim bdd As Database
Dim Rst As Recordset
Set bdd = CurrentDb
Set Rst = bdd.OpenRecordset("SELECT DAS.* FROM DAS")
If Not Rst.EOF Then
Rst.MoveFirst
Do
If ([Form_fNouveaudas].NUMDAS) = Rst.Fields("N°DAS") Then
MsgBox "tout compris mec ..."
Else
Rst.MoveNext
End If
Loop Until (NUMDAS.Value = Rst.Fields("N°DAS")
End If
End Sub
Dim bdd As Database
Dim Rst As Recordset
Set bdd = CurrentDb
Set Rst = bdd.OpenRecordset("SELECT DAS.* FROM DAS")
If Not Rst.EOF Then
Rst.MoveFirst
Do
If ([Form_fNouveaudas].NUMDAS) = Rst.Fields("N°DAS") Then
MsgBox "tout compris mec ..."
Else
Rst.MoveNext
End If
Loop Until (NUMDAS.Value = Rst.Fields("N°DAS")
End If
End Sub
Jten ai fait un qui fonctionne adapte le a ton code et dit moi après ... attention au quotes et tout sa
Private Sub verif_Click()
Dim bdd As DAO.Database
Dim Rst As DAO.Recordset
Set bdd = CurrentDb
If IsNull(NUMDAS) Then
MsgBox "Rentre un nombre", vbCritical
Else
If IsNumeric(NUMDAS) = False Then
MsgBox "Ceci n'est pas un nombre", vbCritical
Else
Set Rst = bdd.OpenRecordset("SELECT N°DAS FROM DAS WHERE N°DAS = " & NUMDAS.Value & " ")
If Not Rst.EOF Then
MsgBox "tout compris mec ..."
Else
MsgBox "rien compris mec ..."
End If
End If
End If
End Sub
Private Sub verif_Click()
Dim bdd As DAO.Database
Dim Rst As DAO.Recordset
Set bdd = CurrentDb
If IsNull(NUMDAS) Then
MsgBox "Rentre un nombre", vbCritical
Else
If IsNumeric(NUMDAS) = False Then
MsgBox "Ceci n'est pas un nombre", vbCritical
Else
Set Rst = bdd.OpenRecordset("SELECT N°DAS FROM DAS WHERE N°DAS = " & NUMDAS.Value & " ")
If Not Rst.EOF Then
MsgBox "tout compris mec ..."
Else
MsgBox "rien compris mec ..."
End If
End If
End If
End Sub
Précédent
- 1
- 2