Req sql

Résolu
cs_faraday Messages postés 13 Date d'inscription lundi 19 avril 2004 Statut Membre Dernière intervention 8 septembre 2004 - 30 août 2004 à 17:33
cs_ITALIA Messages postés 2169 Date d'inscription vendredi 20 avril 2001 Statut Membre Dernière intervention 30 juin 2009 - 30 août 2004 à 19:46
bonjour j'ai mon camp qui s'appelle num_adher et ma table access qui s'appelle echeancier ce code me permet d'affichier dans un tesbox le nombre de num_adher repeté dans ma table echeance mais il y a un message d'erreur si vous pouvez regarder le code pour moi
With d6
m = 1000
.DatabaseName = chemin.RecordSource "select count(*) as Compte from echeancier where num_adher '" & m & " ' ;"
.Refresh
t8.Text = .Recordset!compte
end with

2 réponses

cs_ITALIA Messages postés 2169 Date d'inscription vendredi 20 avril 2001 Statut Membre Dernière intervention 30 juin 2009 9
30 août 2004 à 19:46
si c du Numérique alors :

Select count(*) as Compte from echeancier where num_adher = " & m & " ;"

si c du texte alors :

Select count(*) as Compte from echeancier where num_adher = ' " & m & " ' ;"

It@li@
3
cs_ITALIA Messages postés 2169 Date d'inscription vendredi 20 avril 2001 Statut Membre Dernière intervention 30 juin 2009 9
30 août 2004 à 17:58
Dim Compte as Integer

Select count(num_adher) as Compte from echeancier where num_adher = '" & m & "' ;"

-------------------------------------------------------------------------
c'est koi comme type num_adher dans ta Base texte ou Numerique

It@li@
0
Rejoignez-nous