Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Select Statement Confusion
There are 9 tables: totals_table, data1, data2, data3, . . . , data8
each data# table has the same fields: shipdataid, num_bundles, size, length, grade, boardfeet, price_per_thou_boardft (not real name), total
note: the reason they have the same fields is because each table is attached to a SEPARATE ROW of controls on the same form.
I want to build a "report making form", where the user can choose conditions from comboboxes and create a report based on the conditions he chose.
I'm starting with a single combo and cmd button. In the combo, I put the same values found in the size fields from tables data1 - data8.
These values are 2x4, 2x6, 2x8, . . .
In the button's click event I put this code:
select data1.boardfeet, data2.boardfeet, data3.boardfeet, data1.total, data2.total, data3.total;
from data1, data2, data3;
where data1.siz = thisform.pageframe1.page2.sz1.displayvalue;
or data2.siz = thisform.pageframe1.page2.sz1.displayvalue;
or data3.siz = thisform.pageframe1.page2.sz1.displayvalue;
I'm not getting what I'm supposed to.
If anyone has suggestions or advice on this report, I'm all ears.
Thanks
JD
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