
I can't say I have tried it, but there should be no reason why the Jet's
Query Object shouldn't work.

The following works, using dbase files we have.
If you name the query (as I'm only using it once I'm not naming it) you
can keep calling it as often as you want, by referencing the query in
the querydefs collection.

Hope this helps

Eamonn

Dim DbsDbase As Database
Dim RstDbase As Recordset
Dim QryDbase As QueryDef

Set DbsDbase = OpenDatabase("V:\etutils\data", False, False, "Dbase
IV;")
Set QryDbase = DbsDbase.CreateQueryDef("", "Select FMCmpno from
Subcamps.dbf")
Set RstDbase = QryDbase.OpenRecordset

While Not RstDbase.EOF
    Debug.Print RstDbase.Fields("FMCmpno")
    RstDbase.MoveNext
Wend

RstDbase.Close
Set RstDbase = Nothing
QryDbase.Close
Set QryDbase = Nothing
DbsDbase.Close
Set DbsDbase = Nothing

> -----Original Message-----
> From: Nico Michael [SMTP:nicom@rocketmail.com]
> Sent: 09 February 1999 11:39
> To:   ETurley@alban.co.uk
> Subject:      
> 
> 
> Dear  Eamonn,
> I cant thank you enough for you help.
> 
> I got your code to work fairly quickly.
> 
> I have one question if I wish to run a SQL query
> eg "SELECT * FROM members WHERE paidup=1"
> how do I store this query
> 
> is there such a thing as a QueryObject