You are here:

Visual Basic/T.L.E Visual Basic Programming (E-Voting System)


QUESTION: Good day, Im Graciel Ann from the Philippines.
Im a 3rd year High school from Maragondon National High School.
Im asking for the codes on how to count records in database.
Im hoping for your answer.
Thanks in advance :)

ANSWER: Contact me on monday and i shall send u the code

---------- FOLLOW-UP ----------

QUESTION: Hello Good Day ! Can you please the codes on how to count records in database. Thank You..

'put a check mark on Project_references_Microsoft ActiveX Dataobjects library
Option Explicit
Dim cn As ADODB.Connection, rec As ADODB.Recordset

Private Sub Command1_Click()
Print rec.RecordCount

End Sub

Private Sub Form_Load()
Set cn = New ADODB.Connection
Set rec = New ADODB.Recordset
cn.Open ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\Access\Test_1.mdb;Persist Security Info=False")
'change the path and mdb name to suit your case
rec.Open ("select item from testable"), cn, adOpenStatic, adLockReadOnly

End Sub

ravindra mg

Visual Basic

All Answers

Answers by Expert:

Ask Experts




visual basic application programming from design to access information, sql, engineering and commercial applications. access databases, excel.(VB6) basic questions in vb 2008. Optional: 1)a large number of people want me to do work which takes some time and effort. can do projects in vb 2008. Pl.note that i would like to be paid for such work. 2) if you want me to spend quality time and do special work, i expect to be paid a reasonable price for my time. 3) if you are pleased with my reply you could consider a good amount. 4) you can visit my website


programming since the past 15 years. have completed a large number of projects in Industrial applications, finance,accounts, correspondence. excel macros etc

engineering, management degrees.

Past/Present Clients
project work for a Norway company,USA company and a Canadian company completed. Freelance Project work and Teaching. helping programmers with their work
teaching vb

©2017 All rights reserved.