Dynamically opening a table

  • Thread starter Thread starter H. Martins
  • Start date Start date
H

H. Martins

Using VBA, I need to open and read some records of another unrelated
table (not related to the present table structure).

Can I have some help please?

Thanks
H. Martins
 
PARAMETERS RID Long;
SELECT tblSub.enClass AS SysClass, tblSub.txtSubName, tblSub.hyperWorkSheet
FROM tblSub
WHERE tblSub.pkID)=[RID];

Dim db As DAO.Database
Dim qdf As DAO.QueryDef
Dim rst As DAO.Recordset

Set db = CurrentDb
Set qdf = db1.QueryDefs("qryViewRID")
qdf.Parameters("RID") = lngID
Set rst = qdf.OpenRecordset(dbOpenSnapshot, dbReadOnly)
 
Back
Top