Question Sum function to plot chart/graph

joenyo

New member
Joined
Oct 25, 2021
Messages
1
Programming Experience
Beginner
Hi friends, im currently doing a chart page to let user choose the date from the access database. Once the user choose the date, the graph will generate. This graph consists of total drink of water and cup size. I want to sum the total drink of water but i cant figure it out. Can anyone help me. below is my code

1635143686269.png
 
Last edited:

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,580
Location
Sydney, Australia
Programming Experience
10+
If I'm interpreting this correctly, you need to provide an alias for that sum in your SQL code and then use that alias as the column name when plotting your data, e.g.
SQL:
SUM(drink_ml) AS total_drink_ml
and:
VB.NET:
r("total_drink_ml")
 
Top Bottom