I need two SELECT statements in one query, because it cannot be done by one statement. Can it be done somehow?
Example:
SELECT Field0, Sum(Field1 * Field2)
FROM Table1
WHERE Field3 <> 'text' AND Field4 >= Forms!Form1!txtbox1 and Field4 <= Forms!Form1!txtbox2
SELECT Field0, Sum(Field1 * (Field2/100))
FROM Table1
WHERE Field3 = 'text' AND Field4 >= Forms!Form1!txtbox1 and Field4 <= Forms!Form1!txtbox2
I need both these two statements showed in one query datasheet view. I need more, I need them both mixed and sorted by those sums.
Example:
SELECT Field0, Sum(Field1 * Field2)
FROM Table1
WHERE Field3 <> 'text' AND Field4 >= Forms!Form1!txtbox1 and Field4 <= Forms!Form1!txtbox2
SELECT Field0, Sum(Field1 * (Field2/100))
FROM Table1
WHERE Field3 = 'text' AND Field4 >= Forms!Form1!txtbox1 and Field4 <= Forms!Form1!txtbox2
I need both these two statements showed in one query datasheet view. I need more, I need them both mixed and sorted by those sums.