{Access} problème de requête - Page 2

Résolu
  • Votes
  • Date
  • Date décroissante
  1. Euh attends qu'est ce qui génère la vérification c'est un bouton???
    1. ?
      une autre question le signe différent en vb sous access c'est quoi ?
      1. 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
        1. 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
          1. 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
            Précédent
            • 1
            • 2