I need to get a total of a specific column of a table of access db in a text box in my visual basic application. What should be the code? I am using adodc to connect with the database.
Help urgent please..........
shahriar2403
0
Light Poster
Recommended Answers
Jump to PostSimply try using SUM(column_name) using SQL query.
Jump to Posttry this code. hope this will help you.........
Dim db As Database Dim rs As Recordset Dim tot As Double Set db = OpenDatabase(App.Path & "\rate.mdb") Set rs = db.OpenRecordset("report", dbOpenTable) tot = 0 If rs.RecordCount > 0 Then rs.MoveFirst While Not rs.EOF() tot = tot + …
All 7 Replies
debasisdas
580
Posting Genius
Featured Poster
shahriar2403
0
Light Poster
choudhuryshouvi
33
Posting Pro
cometburn
2
Junior Poster
shahriar2403
0
Light Poster
cometburn
2
Junior Poster
choudhuryshouvi
33
Posting Pro
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.