J
JB
I am currently working on an Access app using Access 2003 with security. I
have many listboxes that are populated with RWOP queries using code similar
to the following
Dim qry As QueryDef
Dim prmClientID As Parameter
Set qry = CurrentDb.QueryDefs("qryData_GetEmployeeList")
Set prmClientID = qry.Parameters!prmClientID
prmClientID = 1
Dim rst As DAO.Recordset
Set rst = qry.OpenRecordset()
With EmployeeList
.RowSourceType = "Table/Query"
Set .Recordset = rst
End With
Set prmClientID = Nothing
Set rst = Nothing
Set qry = Nothing
this works fine in Access 2003 but I have just discovered that Access 2000
apparently doesn't support the recordset property and so the above code won't
run.
Given that I am using security and so must use stored queries, what is the
equivalent syntax that will work under Access 2000. The sticking point is
how to implement reference to a parameterized query without the recordset
property?
have many listboxes that are populated with RWOP queries using code similar
to the following
Dim qry As QueryDef
Dim prmClientID As Parameter
Set qry = CurrentDb.QueryDefs("qryData_GetEmployeeList")
Set prmClientID = qry.Parameters!prmClientID
prmClientID = 1
Dim rst As DAO.Recordset
Set rst = qry.OpenRecordset()
With EmployeeList
.RowSourceType = "Table/Query"
Set .Recordset = rst
End With
Set prmClientID = Nothing
Set rst = Nothing
Set qry = Nothing
this works fine in Access 2003 but I have just discovered that Access 2000
apparently doesn't support the recordset property and so the above code won't
run.
Given that I am using security and so must use stored queries, what is the
equivalent syntax that will work under Access 2000. The sticking point is
how to implement reference to a parameterized query without the recordset
property?