Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / February 2006

Tip: Looking for answers? Try searching our database.

Select Count(*) question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TechBoy - 28 Feb 2006 16:49 GMT
In VB6 I have this code for returning data to a recordset via 2
Selects:

1. Select * from MyTable (98 rows of data are here)
rs.recordcount returns "98"

2. Select count(*) from MyTable
rs.recordcount returns a value of 1 - which is fine
Here, rs!results returns "98" - this is very helpful in other parts of
my app.

Thinking I could just copy the code from VB6 to Access 2003, I did
that.
But in my Access app, I found I cannot use "rs!results".  (also tried
"rs.results" which did not show up in the intellisense)
My select count yields 1 row here too, but I need to return the results
of that count (that shows that 98 rows were counted) like I did in the
VB6 app.

Is there any way in Access to return the results of a select count?

Thanks.
james.igoe@gmail.com - 28 Feb 2006 16:57 GMT
If this is an array, the value should be in the array.  No?  So...rs(0)

James Igoe
Access/Excel VBA Developer
http://code.comparative-advantage.com/
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.