At the opposite it makes sense for Field objects belonging to a Recordset.
An approach can be something like:
Code: Select all
Dim db, query, rs
Set db = Application.CurrentDb()
Set query = db.QueryDefs("SELECTTD")
sSql = Replace(query.SQL, "?", CStr(_RACINE)) ' _RACINE is presumed a number
Set rs = db.OpenRecordset(sSql)
Code: Select all
db.DLookup(...)