I am using a form (frmA) to fire multiple queries, which in turn, each query run fires a continuous form (frm1). On this form ( frm1) there are 2 frames with options ( reporttype with 3 options, and whatrecords with two options) whatrecord option1 is tagged, which has a yes/no checkbox in the detail beside each record. option2 is all records in the dynaset. I want to take frm1 recordset and filter on the checkbox value <true tagged> and send this dynaset to the report. The report is a summary report with more then one record that should display. Problem is the report recordsource. The queries are parameter queries, requesting user to enter parameter in a inbox box < from query, bound to frm1> I thought i should use the recordsetclone and filter the records, but now i am stuck, and getting an object required error
here is the code:
i have made a module with the dim statements for dao database and recordset thinkin that would help
Dim stDocName As String
Dim strfilter As String
stDocName as String
'Dim rst As DAO.Recordset
'Set db = CurrentDb()
Set rst = Me.RecordsetClone
rst.MoveLast
MsgBox rst.RecordCount
rst.Filter = (Me!PrintTag = True)
Set rst = rst.OpenRecordset(rst)
rst.MoveLast
MsgBox rst.RecordCount
DoCmd.OpenReport stDocName, acViewPreview
Reports!rptGBA.recordset = rst.recordset
'close rst in report after run
stDocName = ""
stDocName = "rptGBAind"
'Individual report bound to form and works fine
If RecType = 2 And WhatRec = 2 Then
strfilter = (Me!PrintTag = True)
DoCmd.OpenReport stDocName, acViewPreview, strfilter
End If
well that is all the recordset code, and it does not work. anyone have any ideas????
thanks in advance
here is the code:
i have made a module with the dim statements for dao database and recordset thinkin that would help
Dim stDocName As String
Dim strfilter As String
stDocName as String
'Dim rst As DAO.Recordset
'Set db = CurrentDb()
Set rst = Me.RecordsetClone
rst.MoveLast
MsgBox rst.RecordCount
rst.Filter = (Me!PrintTag = True)
Set rst = rst.OpenRecordset(rst)
rst.MoveLast
MsgBox rst.RecordCount
DoCmd.OpenReport stDocName, acViewPreview
Reports!rptGBA.recordset = rst.recordset
'close rst in report after run
stDocName = ""
stDocName = "rptGBAind"
'Individual report bound to form and works fine
If RecType = 2 And WhatRec = 2 Then
strfilter = (Me!PrintTag = True)
DoCmd.OpenReport stDocName, acViewPreview, strfilter
End If
well that is all the recordset code, and it does not work. anyone have any ideas????
thanks in advance