{Access} problème de requête
Résolu
nikos le grec
Messages postés
102
Date d'inscription
Statut
Membre
Dernière intervention
-
Utilisateur anonyme -
Utilisateur anonyme -
Bonjour,
voici mon code :
INSERT INTO Devis ([N° Devis], N°lancement)
SELECT tCréationlancement.N°lancement, tCréationlancement.[N° Devis]
FROM tCréationlancement;
et mon problème c'est que j'ai un message qui me dit : "l'instruction INSERT INTO contient le nom de champ inconnu suivant : 'N°lancement'. Assurez-vous que vous avez correctement saisi le nom, puis recommencez l'opération".
j'ai regardé et j'ai bien saisi le nom et il m'affiche toujours ce même message.
pouvez-vous m'aider svp ?
voici mon code :
INSERT INTO Devis ([N° Devis], N°lancement)
SELECT tCréationlancement.N°lancement, tCréationlancement.[N° Devis]
FROM tCréationlancement;
et mon problème c'est que j'ai un message qui me dit : "l'instruction INSERT INTO contient le nom de champ inconnu suivant : 'N°lancement'. Assurez-vous que vous avez correctement saisi le nom, puis recommencez l'opération".
j'ai regardé et j'ai bien saisi le nom et il m'affiche toujours ce même message.
pouvez-vous m'aider svp ?
29 réponses
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