Count distinct record and summ result in var

sal21 Messages postés 13 Date d'inscription mardi 28 novembre 2000 Statut Membre Dernière intervention 25 février 2008 - 20 oct. 2007 à 19:28
cs_DARKSIDIOUS Messages postés 15814 Date d'inscription jeudi 8 août 2002 Statut Membre Dernière intervention 4 mars 2013 - 20 oct. 2007 à 20:51
With a vba macro, please...

I have in C:\MYDIR\
access database named MYDATABASE
and  table named MYTABLE.




Structure of
MYTABLE




Campo1    Campo2    Campo3

BIANCO    AAA    1

BIANCO    BBB    4

BIANCO    BBB    4

BIANCO    BBB    4

BIANCO    BBB    4

BIANCO    BBB    4

BIANCO    BBB    4

BIANCO    CCC    7

BIANCO    CCC    7

NERO    AAA    1

NERO    AAA    1

NERO    BBB    4

NERO    BBB    4

NERO    CCC    7

NERO    CCC    7

NERO    CCC    7

NERO    CCC    7

NERO    CCC    7

NERO    CCC    7

ROSSO    AAA    1

ROSSO    AAA    1

ROSSO    AAA    1

ROSSO    AAA    1

ROSSO    AAA    1

ROSSO    AAA    1

ROSSO    BBB    4

ROSSO    BBB    4

ROSSO    CCC    7








  

How to count for ROSSO (same for all record in campo1) each occurence in filed 2 and summ the value from field campo3.

Store the result in a var_ROSSO_AAAA

example for ROSSO in campo1:

ROSSO for AAA = 6

ROSSO for BBB = 8

ROSSO for CCC = 7

1 réponse

cs_DARKSIDIOUS Messages postés 15814 Date d'inscription jeudi 8 août 2002 Statut Membre Dernière intervention 4 mars 2013 130
20 oct. 2007 à 20:51
Salut,

Tu es sur un forum francophone ici, donc parle en français, il existe assez de forum anglophone sinon...
______________________________________
DarK Sidious
0
Rejoignez-nous