breezett93
Technical User
Hello
I have a promise date vs actual date form that I am creating. The user can enter a date range from x to y to see all orders that shipped between those dates. The data that comes up also displays the promise date and actual(ship) date for the orders within the user's range.
I'm trying to implement a "Show Late Orders' button that will display orders where the actual date is greater than the promise date while staying within the date range specified by the user.
I thought that the best option would be to implement the query in the VBA of the form since some of the criteria is dependent on what the user inputs.
Here is what I have so far:
SELECT all the stuff I need
FROM TableA INNER JOIN TableB ON TableA.[OrdId] = TableB.[OrdId]"
WHERE ([Actual Date] is Between [Forms]![frmMyForm]![txtFrom] AND [Forms]![frmMyForm]![txtTo]) And [Actual Date] > [Promised Date]"
ORDER BY TableA.IvcID DESC;"
After that, I'll then need to calculate the percentage of late orders, but that's a separate problem.
Thanks
I have a promise date vs actual date form that I am creating. The user can enter a date range from x to y to see all orders that shipped between those dates. The data that comes up also displays the promise date and actual(ship) date for the orders within the user's range.
I'm trying to implement a "Show Late Orders' button that will display orders where the actual date is greater than the promise date while staying within the date range specified by the user.
I thought that the best option would be to implement the query in the VBA of the form since some of the criteria is dependent on what the user inputs.
Here is what I have so far:
SELECT all the stuff I need
FROM TableA INNER JOIN TableB ON TableA.[OrdId] = TableB.[OrdId]"
WHERE ([Actual Date] is Between [Forms]![frmMyForm]![txtFrom] AND [Forms]![frmMyForm]![txtTo]) And [Actual Date] > [Promised Date]"
ORDER BY TableA.IvcID DESC;"
After that, I'll then need to calculate the percentage of late orders, but that's a separate problem.
Thanks