T
taco
Hi everyone;
I have a Table called Transactions. In this table I'm storing data as; which
employee, for which customer, on which machine, what amount of trasaction
made. Now I'm trying to build a form for reporting. On this form, criterias
are choosen by combo boxes. I would like to have report based on just
employee, or customer or between dates. One by one there is no problem to
build different queries for each report criteria. But when I want to have a
report like "Between 01/11/08 and 20/11/08, employee "A"'s actions (date
criteria and customer is blank) query is not working. How can I build the
query to work properly for any criteria variation ? Just employee's actions,
or just customer's actions, or emloyee's actions with one single spesific
customer, or between some dates customer's actions on one spesific machine
regardless who was the employee, etc.
here is the query I've tried;
SELECT Transactions.TrDate, Transactions.TrHour, Transactions.Machine,
Transactions.Attendance, Transactions.Customer, Transactions.CrIn,
Transactions.CrOut, Transactions.TrValue, Transactions.Cash
FROM Transactions
WHERE Transactions.TrDate Between Forms!SDate!Text15 And Forms!SDate!Text17
And Transactions.Machine=Forms!SDate!Combo10 And
Transactions.Customer=Forms!SDate!Combo13 And
(Transactions.Attendance=Forms!SDate!Combo8 Or Forms!SDate!Combo8 Is Null);
Your help is most appreciated.
Regards;
I have a Table called Transactions. In this table I'm storing data as; which
employee, for which customer, on which machine, what amount of trasaction
made. Now I'm trying to build a form for reporting. On this form, criterias
are choosen by combo boxes. I would like to have report based on just
employee, or customer or between dates. One by one there is no problem to
build different queries for each report criteria. But when I want to have a
report like "Between 01/11/08 and 20/11/08, employee "A"'s actions (date
criteria and customer is blank) query is not working. How can I build the
query to work properly for any criteria variation ? Just employee's actions,
or just customer's actions, or emloyee's actions with one single spesific
customer, or between some dates customer's actions on one spesific machine
regardless who was the employee, etc.
here is the query I've tried;
SELECT Transactions.TrDate, Transactions.TrHour, Transactions.Machine,
Transactions.Attendance, Transactions.Customer, Transactions.CrIn,
Transactions.CrOut, Transactions.TrValue, Transactions.Cash
FROM Transactions
WHERE Transactions.TrDate Between Forms!SDate!Text15 And Forms!SDate!Text17
And Transactions.Machine=Forms!SDate!Combo10 And
Transactions.Customer=Forms!SDate!Combo13 And
(Transactions.Attendance=Forms!SDate!Combo8 Or Forms!SDate!Combo8 Is Null);
Your help is most appreciated.
Regards;