Dynamically opening a table

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
 
G

Guest

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top