|
Home > Archive > MS Access project with SQL Server > May 2005 > RecordCount Not Counting Correctly
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
RecordCount Not Counting Correctly
|
|
| Jeff via AccessMonster.com 2005-05-13, 1:24 pm |
| I have the following code but it's not counting all my records. Any ideas?
Me.Recordset.MoveLast
Me.Recordset.MoveFirst
Me.HowManyRecords = Me.Recordset.RecordCount
--
Message posted via http://www.webservertalk.com
| |
| Sylvain Lafontaine 2005-05-16, 11:24 am |
| Maybe you have a local or a server filter on your form.
I'm not sure here but the recordsets used by ADP are client recordset with
no server cache, so there is no need to use Me.Recordset.MoveLast and
Me.Recordset.MoveFirst before accessing the property RecordCount.
--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
"Jeff via webservertalk.com" <forum@nospam.webservertalk.com> wrote in
message news:ee51367478514d7
581e74f3749c11837@we
bservertalk.com...
>I have the following code but it's not counting all my records. Any ideas?
>
> Me.Recordset.MoveLast
> Me.Recordset.MoveFirst
>
> Me.HowManyRecords = Me.Recordset.RecordCount
>
> --
> Message posted via http://www.webservertalk.com
| |
| Alex White MCDBA MCSE 2005-05-16, 1:24 pm |
| If you open in code
e.g.
dim adoTest as new adord.recordset
with adoTest
.open "Select * from
TblTest",currentproject. connection,adopenkey
set,adlockreadonly
msgbox .recordcount
.close
end with
will give you the correct record count it's down to the adopenkeyset
why not create a function to just to return the record count,
--
Regards
Alex White MCDBA MCSE
http://www.intralan.co.uk
"Sylvain Lafontaine" <sylvain aei ca (fill the blanks, no spam please)>
wrote in message news:OBFxFVjWFHA.2348@TK2MSFTNGP14.phx.gbl...
> Maybe you have a local or a server filter on your form.
>
> I'm not sure here but the recordsets used by ADP are client recordset with
> no server cache, so there is no need to use Me.Recordset.MoveLast and
> Me.Recordset.MoveFirst before accessing the property RecordCount.
>
> --
> Sylvain Lafontaine, ing.
> MVP - Technologies Virtual-PC
>
>
> "Jeff via webservertalk.com" <forum@nospam.webservertalk.com> wrote in
> message news:ee51367478514d7
581e74f3749c11837@we
bservertalk.com...
>
>
|
|
|
|
|