Hello everyone
I am having a bit of a problem with displaying the values returned by a sum query. Heres my situation :
SELECT SUM(fldMaterial) AS Expr1, SUM(fldBob) AS Expr2, SUM(fldBrian) AS Expr3
FROM tbljobs
I have 3 columns of interest that I just want to sum all value. This works great in query builder.
Now on a form I want to display each return in a textbox.
A simple line of code will display the first result but I have no idea on how to access the last two.
TextBox1.Text = CStr(Me.TbljobsTableAdapter.GetTotals)
In my simple train of thought I would have thought something like this would work.
TextBox1.Text = CStr(Me.TbljobsTableAdapter.GetTotals,Expr1)
TextBox2.Text = CStr(Me.TbljobsTableAdapter.GetTotals,Expr2)
TextBox3.Text = CStr(Me.TbljobsTableAdapter.GetTotals,Expr3)
P.S - Why it that when I answer one question 5 more pop up?? haha
I am having a bit of a problem with displaying the values returned by a sum query. Heres my situation :
SELECT SUM(fldMaterial) AS Expr1, SUM(fldBob) AS Expr2, SUM(fldBrian) AS Expr3
FROM tbljobs
I have 3 columns of interest that I just want to sum all value. This works great in query builder.
Now on a form I want to display each return in a textbox.
A simple line of code will display the first result but I have no idea on how to access the last two.
TextBox1.Text = CStr(Me.TbljobsTableAdapter.GetTotals)
In my simple train of thought I would have thought something like this would work.
TextBox1.Text = CStr(Me.TbljobsTableAdapter.GetTotals,Expr1)
TextBox2.Text = CStr(Me.TbljobsTableAdapter.GetTotals,Expr2)
TextBox3.Text = CStr(Me.TbljobsTableAdapter.GetTotals,Expr3)
P.S - Why it that when I answer one question 5 more pop up?? haha