I am trying to pass the value from the cmboActions box to the query via the following method:
Expand|Select|Wrap|Line Numbers
- Dim qdf As QueryDef
- Dim rst As Recordset
- Set qdf = CurrentDb.QueryDefs(qry_ActionTaken_parm)
- qdf.Parameters(0) = cmboActions.value
- Set rst = qdf.OpenRecordset
- DoCmd.OpenQuery "qry_ActionTaken_parm" rst.Close
- qdf.Close
- Set rst = Nothing
- Set qdf = Nothing
Set qdf = CurrentDb.QueryDefs(qry_AssetActionTaken_parm)"Variable not defined" on the query name
OR.... is there a better way to accomplish what I am trying to do? Trying to avoid having to build a separate query for each different value of 'ActionTaken' Any help would be appreciated.