Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need count records, please helpme!

Status
Not open for further replies.

seidel

Programmer
Oct 23, 2002
10
MX
hello! I need count records selected after make this command

sql = "SELECT * FROM table Where ID = " + cstr(idinput)


how count selected records?

vbscript

thanks
 
Use the RecordSet.RecordCount function.

Count = rs.RecordCount Rob
Just my $.02.
 
Many thansk fo ryour advice but .recordcount count ALL records in my database.... not count selected records....

example: my database have 100 records when make a sql call I selected 45(example) records, how count this records?

thanks
 
Hi!

Perform another Query and read out the value:

sql = "SELECT COUNT(*) FROM table Where ID = " + cstr(idinput)

Greetings
Remo
 
Many thanks for your help to my question! i solved!, opne my database in the correct form and these methos run ok!

thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top