Vorrei solo risolvere...
In tutti i casi anche conoscendo l'elemento la query estrae sempre ciò che non deve estrarre:
ID=1codice:strSQL = "SELECT * FROM Tabella WHERE TOT = 0 AND ELEMENTO = '"&strELEMENTO&"' AND IDMESE IN (1,2,3,4,5)"
Elemento=automobile
tot=0
IDMese=1
ID=100
Elemento=automobile
tot=0
IDMese=2
ID=1000
Elemento=automobile
tot=0
IDMese=3
che non dovrebbe estrarre perchè in IDMese mancano il 4 ed il 5...

Rispondi quotando