Stuart McLachlan
stuart at lexacorp.com.pg
Fri Aug 7 17:12:45 CDT 2009
As a matter of style, I never bother to Dim db. I just use: Dim rs as DAO.Recordset Set rs = Currentdb.OpenRecordset("myQuery") On 7 Aug 2009 at 16:17, Heenan, Lambert wrote: > Looks a touch like Air Code there. Should be.... > > Dim db As dao.Database > Dim rs As dao.Recordset > > Set db = CurrentDb > Set rs = db.OpenRecordset("MyQuery") > > Lambert > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Friday, August 07, 2009 4:10 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] OpenRecordSet question > > In dao you can definitely just open the query (or table) > > Dim db as dao.database > dim rst as dao.recordset > > set db = currentdb > set rst = db.Open("MyQuery") > > John W. Colby > www.ColbyConsulting.com > > > Charlotte Foust wrote: > > If you're doing this in code, you have to use Select * from myquery. > > As a datasource, you can use the named query. > > > > Charlotte Foust > > > > -----Original Message----- > > From: accessd-bounces at databaseadvisors.com > > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Arthur > > Fuller > > Sent: Friday, August 07, 2009 12:49 PM > > To: Access Developers discussion and problem solving > > Subject: [AccessD] OpenRecordSet question > > > > Can I open a recordset just using a named query, or do I have to > > select > > * from myquery? I can't remember. > > TIA, > > Arthur > > -- > > 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