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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recordcount always show 1....

Status
Not open for further replies.

Learnerprog

Programmer
Apr 21, 2004
52
US
Hello all,
I don't know why my recordcount always show 1 even though there are more than one records return.. please help..

Thanks, JM
 
Are you refering to a recordset? Try:

rs.MoveLast: rs.MoveFirst

before you use the count.

-Gary
 
Depending on your SQL, a record count of one may indeed be the right answer. For example, the sql of:

Code:
SELECT COUNT(US_State) as Total_States FROM STATES

Will show a record count of 1. However, we all know that the US has 50 states. You will only see the number 50 if you reference the value of the recordset field.

Give that a try.

Regards,



Randy
[afro]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top