If you need something you can put into a query, you would use brackets in the where clause to define a variable, which would prompt the query to ask you to input the value. Something like:
Select Field1, field2, field3, field4
From tbl1
Where (((tbl1.field1)=[Route Number]));
You are going...
I'm not an Access MVP, but I've solved a similar problem in my own experiences by creating a table with the results of the query, modifying the data on the new table, and running an update query from the new table to modify the original table. Make sure to back up your data.
There's probably a...
dhookom,
Thanks for the awesome suggestion to use Sum(Abs. I didn't even know that function worked for date fields. I've used so many Sum(IIf functions. This will really help me.
Dhookom,
You are absolutely correct. My apologies. I should of taken the time to make sure that it would work in a query.
This works:
SELECT Format([your_date],"MM/DD/YY") AS [TheDate]
FROM your_table;
Here is what I ended up using. Total of 3 queries. Third query just joins the first two and displays the data. I use IIf statements and sum to count multiple fields in a single query. I'm sure there is a better way to do that.
Qry1
SELECT s_dates.Date, Sum(IIf([dt_closed]=[Date],1,0)) AS...
The missing piece to much of the trial and error queries I had already written was the variable date. Creating a table with a list of dates solved that problem for me. Thanks dhookom.
Thanks for all the suggestions.
Thanks for the response MazeWorX. I changed the table and field names to make it easier to explain.
[CountOfreceipt_dt]-[CountOfcomplete_dt] will not give me the open inventory for a given day, as it does not take into account anything left over from the previous date.
"Example if I received 5...
I'm trying to create a query to display the number of records received, completed, and on hand for a specified range of dates (via a form). Counting the received and completed records is no problem, its the counting whats incomplete at the end of a given day that's giving me trouble.
Example if...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.