B
Bryan
Access 2003
Help. Can not set the subform recordsource. Returns error "Type Mismatch"
Dim rs As DAO.Recordset
Dim qdf As DAO.QueryDef
Set qdf = CurrentDb.QueryDefs("QRY_DUPLICATE")
qdf.Parameters("prmDate") = txtstartDate
Set rs = qdf.OpenRecordset
msgbox rs.recordcount <---'Quick test returns the expected rows
Me.frmsubhours.Form.RecordSource = rs <----Type Mismatch
Help. Can not set the subform recordsource. Returns error "Type Mismatch"
Dim rs As DAO.Recordset
Dim qdf As DAO.QueryDef
Set qdf = CurrentDb.QueryDefs("QRY_DUPLICATE")
qdf.Parameters("prmDate") = txtstartDate
Set rs = qdf.OpenRecordset
msgbox rs.recordcount <---'Quick test returns the expected rows
Me.frmsubhours.Form.RecordSource = rs <----Type Mismatch