0

Hi Frns,

Plz som1 help me, I want to add the values of a coloumn in MS Access db, I m using Visual Basic as a front end. The total should be displayed on the Form. So if possible then plz tell me the VB coding.
Thnx in advnce.

2
Contributors
1
Reply
2
Views
11 Years
Discussion Span
Last Post by aparnesh
0
Dim db as database
Dim rs as recordset
set db = opendatabase("Access_Database_Path")
set rs = db.Open("Table_Name")
Dim mTotal
Do until rs.EOF
   mTotal = mTotal + rs("ColumnName")
   rs.MoveNext
Loop
Text1.text = mTotal
rs.Close
db.close
set rs = nothing
set db = nothing
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.