
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