[AccessD] Record Count Problem

Drew Wutka DWUTKA at Marlow.com
Tue Feb 17 09:38:21 CST 2009


Just curious Rocky, what kind of recordset is this (ADO, DAO) and what
kind of cursor type is used?

Sounds like what you are dealing with is a recordset that is forward
only.... but I could be wrong...

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
at Beach Access Software
Sent: Monday, February 16, 2009 10:05 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Record Count Problem

Well I only need to know if there's at least 1 record not the real
record
count.  So I think I'm safe. 


Rocky Smolin
Beach Access Software
858-259-4334
www.e-z-mrp.com
www.bchacc.com
 
 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of William
Hindman
Sent: Monday, February 16, 2009 5:51 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Record Count Problem

...hhhmmm ...iirc (and that gets more hypothetical with every year) the
rs.recordcount will return a count of records "accessed" ...not the
total
count of records in the object ...you have to do a movelast before the
rs.recordcount to be sure what its actually counting.

William

--------------------------------------------------
From: "Rocky Smolin at Beach Access Software" <rockysmolin at bchacc.com>
Sent: Monday, February 16, 2009 3:58 PM
To: "'Access Developers discussion and problem solving'" 
<accessd at databaseadvisors.com>
Subject: Re: [AccessD] Record Count Problem

> I changed
>
> If rs.BOF = True And rs.EOF = True Then
>
> To
>
> If rs.RecordCount = 0 Then
>
> Crude but effective.
>
>
>
> Rocky Smolin
> Beach Access Software
> 858-259-4334
> www.e-z-mrp.com
> www.bchacc.com
>
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Max Wanadoo
> Sent: Monday, February 16, 2009 12:18 PM
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] Record Count Problem
>
> If rs.BOF = True And rs.EOF = True and rs.recordcount = 0 Then GoTo 
> GoodBye Else Goto WaveHelloToRocky End if
>
>
> Or save the PK, then requery, then find saved PK and position on it.
>
>
> Max
>
>
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky 
> Smolin at Beach Access Software
> Sent: 16 February 2009 19:09
> To: 'Access Developers discussion and problem solving'
> Subject: [AccessD] Record Count Problem
>
> Dear List:
>
> In the following:
>
> Set rs = Me.RecordsetClone
> ' If no records then goodbye:
> MsgBox rs.RecordCount
> If rs.BOF = True And rs.EOF = True Then GoTo GoodBye:
>
> the record count shows as 1 but BOF and EOF are both true.
>
> The record was just added.  So the routine exits instead of doing what

> it's supposed to do.
>
> A Me.Requery solves the problem, but leaves the pointer at the start 
> of the the recordset instead of the record the user was working on.
>
> I can's save a bookmark because the Requery triggers the activate 
> event which calls this routine and destroys the bookmark.
>
> But why would the record count show 1 when the BOf and EOF are set to 
> True?
>
> TIA
>
>
>
>
>
>
> Rocky Smolin
>
> Beach Access Software
>
> 858-259-4334
>
> www.e-z-mrp.com <http://www.e-z-mrp.com/>
>
> www.bchacc.com <http://www.bchacc.com/>
>
>
>
>
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.





More information about the AccessD mailing list