[AccessD] OpenRecordSet question

Stuart McLachlan stuart at lexacorp.com.pg
Sat Aug 8 03:52:36 CDT 2009


I'm just waiting for the next time he posts a question so that I can refer him back to this 
thread :-)

On 8 Aug 2009 at 9:43, Max Wanadoo wrote:

> Hang on....looks into crystal ball....Rocky's next question....ummm..oh, yes
> there it is.
> 
> Glad that is answered then!
> 
> Max
> 
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
> Sent: 08 August 2009 00:46
> To: 'Access Developers discussion and problem solving'
> Subject: Re: [AccessD] OpenRecordSet question
> 
> That answers my next question...
> 
> Rocky
>  
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby
> Sent: Friday, August 07, 2009 3:34 PM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] OpenRecordSet question
> 
> Unfortunately that doesn't always work.  If RS loses scope the value of RS
> "goes away".  Inside of the same function this will always work, but if you
> try to pass the recordset off to another function, or a field off to another
> function, then things fail to work as you expect.
> 
> I had enough run-ins with this that I decided just to bite the bullet and do
> the dim db statement as a matter of habit.
> 
> John W. Colby
> www.ColbyConsulting.com
> 
> 
> Stuart McLachlan wrote:
> > As a matter of style, I never bother to Dim db.
> > 
> > I just use:
> > Dim rs as DAO.Recordset
> > Set rs = Currentdb.OpenRecordset("myQuery")
> > 
> > 
> 
> --
> 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





More information about the AccessD mailing list