The database form has a button that, when clicked, will send an email, summarizing in the subject line the $ amount sold so far for the day. This email may be sent several times per day as needed, depending on the pricing volume. Then at the end of the day when all the pricing has been processed, a different button sends a final email (to a larger group of folks) summarizing in the subject line the $ amount for the day plus some other information the midday update email didn't have.
The following code currently exists (and functions fine) in both procedures to create the value for the total $ amount priced during the day (dblPricingSum):
Expand|Select|Wrap|Line Numbers
- Dim dblPricingSum as Double
- dblPricingSum = CurrentProject.Connection.Execute("SELECT Nz(Round(Sum([Price]*[Quantity]),2),0) FROM DailyPricings WHERE ([PricingDate] = Date())")(0)
I've been largely learning Access and VB as I go so I have a lot of holes in my education. Any guidance would be very appreciated!