Bonjour,
J'utilise ACCESS 2003 et j'ai un problème avec un Count.
Voici le code:
Mon but est de savoir combien il y a de Stato mais je n'obtiens rien. Par contre si je teste sans le Count il m'affiche bien tout les Statos.
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 SQLCount = " SELECT Count([Messaggi].Stato)" SQLCount = SQLCount + " FROM Articoli, Cronologici, Messaggi, Macchine " SQLCount = SQLCount + " WHERE Macchine!Cod = " & Modifiable0.Value & " " SQLCount = SQLCount + " AND [Articoli].IDmac = [Macchine].IDmac AND [Articoli].Data >= Modifiable2.value AND [Articoli].Data < Modifiable4.value " SQLCount = SQLCount + " AND [Cronologici].IDart = [Articoli].IDart " SQLCount = SQLCount + " AND [Messaggi].Stato = [Cronologici].Stato " If Modifiable0.Value > 500 Then SQLCount = SQLCount + " AND [Messaggi].IDtipo = [Macchine].IDtipo " Else SQLCount = SQLCount + " AND [Messaggi].IDtipo = 3 " End If If Not Me.Option20 Then SQLCount = SQLCount + " AND [Messaggi].Stato = " & Modifiable18.Value & " " End If SQLCount = SQLCount + " Order by [Cronologici].IDcro " Me.Liste24.RowSource = SQLCount Me.Liste24.Requery
Est ce que quelqu'un saurait pourquoi le Count ne fonctionne pas et comment le faire fonctionner?





Répondre avec citation

Partager