I have an ms access database with table xyz in that there arre three coulmn .i want to do addition of my first column value . & that addition i want to display in vb 6.0 form which having one text box
calculate sum of all record valyee of column & display in vb form
Collapse
X
-
You can do it easily using DAO.
After opening database use following code to see the result in a text box (modify as per your requirement):
Code:Private Sub Command1_Click() 'MsgBox rs.Fields("Col1").Value rs.MoveFirst For i = 1 To rs.RecordCount Text1.Text = Val(Text1.Text) + Val(rs.Fields("Col1").Value) rs.MoveNext Next End Sub
Comment