Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
I have a command button on a form - the click event uses the following code. the report used at the end of the code has a field that references the variable tb2 for each record. The problem is that I'm getting browse windows for each individual variable (i.e. Total12, Total22...) instead of the summation of them (as declared by the statement tb2 = Total12 + Total22 + ...)
SELECT data1.bundle as Total12;
FROM lumber!data1 ;
WHERE siz = szValue and grade = gdValue and length = 2;
SELECT data2.bundle as Total22;
FROM lumber!data2 ;
WHERE siz = szValue and grade = gdValue and length = 2;
SELECT data3.bundle as Total32;
FROM lumber!data3 ;
WHERE siz = szValue and grade = gdValue and length = 2;
SELECT data4.bundle as Total42;
FROM lumber!data4 ;
WHERE siz = szValue and grade = gdValue and length = 2;
SELECT data5.bundle as Total52;
FROM lumber!data5 ;
WHERE siz = szValue and grade = gdValue and length = 2;
SELECT data6.bundle as Total62;
FROM lumber!data6 ;
WHERE siz = szValue and grade = gdValue and length = 2;
SELECT data7.bundle as Total72;
FROM lumber!data7 ;
WHERE siz = szValue and grade = gdValue and length = 2;
SELECT data8.bundle as Total82;
FROM lumber!data8 ;
WHERE siz = szValue and grade = gdValue and length = 2;
tb2 = Total12 + Total22 + Total32 + Total42 + Total52 + Total62 + Total72 + Total82
REPORT FORM siz_grade2.FRX preview
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement