I have a query I have to figure out before I can move on to more complex ones.
It works, but asks for a value before it will run.
Here’s the data.
One table tracking vehicles with many fields but very few used.
I am enclosing screen shots to make more sense.
1st field is vehicle type which first field is grouped to show the 6 available. (text)
2nd field is also vehicle type but count to get total count of each vehicle type.
3rd field is an expression pulled from ‘Load_Date’ which is a date field.
It is marked as ‘not null’ and this is a field that is populated when the vehicle is loaded to be moved.
last field is also expression by subtracting field 3 from field 2.
The resulting number is going to be the remaining vehicles in yard (in yard awaiting to be shipped and a Load_Date populated).
This works, until I run it.
when I run it the first box that pops up is a box asking for a value for TOTAL_BY_TYPE which is field 2.
I click ‘ok’ with no value.
Then a pop-up opens and asks for TOTAL_SHIPPED which is the third field.
Again I click ok with no value input and the query runs and performs the calculations.
what can I do to eliminate these pop up boxes especially since you do not have to enter a value into them to have the query run?
I will include a screen shot of the query running, a screen shot of the query editor and the SQL behind it.
Any ideas?
SQL:
SELECT VEHICLE_MOVEMENT.VEHICLE_TYPE, Count(VEHICLE_MOVEMENT.VEHICLE_TYPE) AS TOTAL_BY_TYPE, Count(VEHICLE_MOVEMENT.LOAD_DATE) AS TOTAL_SHIPPED, [TOTAL_BY_TYPE]-[TOTAL_SHIPPED] AS TOTAL_IN_YARD
FROM VEHICLE_MOVEMENT
GROUP BY VEHICLE_MOVEMENT.VEHICLE_TYPE, [TOTAL_BY_TYPE]-[TOTAL_SHIPPED]
HAVING (((Count(VEHICLE_MOVEMENT.LOAD_DATE)) Is Not Null));
Query Run:
VEHICLE_TYPETOTAL_BY_TYPETOTAL_SHIPPEDTOTAL_IN_YARDSEDAN18915039COUPE17170CONVT13130VAN660TRUCK440SUV990
query editor window attached