D
David
This is SO frustrating, as I did this ages ago, but have since lost the code
and I've been trawling the internet all day.
All I want to do is pass an argument to a select query. The field name is
'Authority Type', in table 'Authority'. I'm positive there was a docmd
function or something similar. I tried using .parameter(), but don't quite
get how that works. I stuck some dummy criteria in the query, but the
parameter.count value never showed more than 0. Is a parameter something else
entirely? RETARDED.
Is there not something like qdf.execute(Where options) or something???? I
just need to pass the field name and lookup value!!!
Dim stDocName As String
Dim db As Database
Dim rs As DAO.Recordset
Dim qdf As QueryDef
Set db = CurrentDb
Set qdf = db.QueryDefs("Authorities") 'Authorities is a basic two-field
query
Set rs = qdf.OpenRecordset
Do While rs.EOF = False
thisAuthority = rs(1).Value
MsgBox thisAuthority
rs.MoveNext
Loop
and I've been trawling the internet all day.
All I want to do is pass an argument to a select query. The field name is
'Authority Type', in table 'Authority'. I'm positive there was a docmd
function or something similar. I tried using .parameter(), but don't quite
get how that works. I stuck some dummy criteria in the query, but the
parameter.count value never showed more than 0. Is a parameter something else
entirely? RETARDED.
Is there not something like qdf.execute(Where options) or something???? I
just need to pass the field name and lookup value!!!
Dim stDocName As String
Dim db As Database
Dim rs As DAO.Recordset
Dim qdf As QueryDef
Set db = CurrentDb
Set qdf = db.QueryDefs("Authorities") 'Authorities is a basic two-field
query
Set rs = qdf.OpenRecordset
Do While rs.EOF = False
thisAuthority = rs(1).Value
MsgBox thisAuthority
rs.MoveNext
Loop