belly0fdesire
Registered User.
- Local time
- Today, 12:01
- Joined
- Dec 1, 2005
- Messages
- 11
Okay... I have a production database that my office uses... Users select a OrderType from the dropdown list and it appends it to a table with their username and the date... each product has a different point value... I have another table with the OrderTypes and their corresponding points... I want to display on the form a sum of all the points for the day. I created a query that pulls all the points for the current user for the current date, but I don't know how to display a sum of that query on the form...
I already have a count already displaying the number of orders completed by that user on that day, by using the module shown below... however that only involved a table and was simple... this one is more complicated because a query was used to retrieve the point value from another table.... hopefully this isn't too confusing... i'm really a beginner trying to learn what I need to know as I go.. can anyone help?
I already have a count already displaying the number of orders completed by that user on that day, by using the module shown below... however that only involved a table and was simple... this one is more complicated because a query was used to retrieve the point value from another table.... hopefully this isn't too confusing... i'm really a beginner trying to learn what I need to know as I go.. can anyone help?
Code:
Public Function OrdersCount(ByVal UName As String, _
ByVal dat As Date) As Integer
OrdersCount = DCount("[OrderNumber]", "Production", _
"[UserName] = '" & UName & _
"' AND [Date] = #" & dat & "#")
End Function