0
我有一个嵌入到包含文本框和按钮的表单中的报表。MS Access,刷新嵌入到表单中的报表
我的愿望是更新报表上的过滤器并重新查询并刷新表单中的报表。我对访问中使用VBA不是很熟悉,所以我可能完全脱离了我试图做到这一点的基础。
单击generateExhib按钮时触发的事件如下。
作为子窗体/子报表嵌入的报表被命名为TagReport。
Private Sub GenerateExhib_Click()
If (generatePrintedExhib.Value = False) Then
Me.TagReport.Application.DoCmd.SetFilter WhereCondition:="[Exhibitor ID] =" + ExhibitorNumber.Value + " AND [UDEntry-CheckBox1] = false"
Else
Me.TagReport.Application.DoCmd.SetFilter WhereCondition:="[Exhibitor ID] =" + ExhibitorNumber.Value
End If
Me.TagReport.Report.Application.DoCmd.Requery
Me.TagReport.Report.Application.DoCmd.RefreshRecord
End Sub
不知道这是罪魁祸首,所以我会把它作为评论发布,但是你为什么要经历“Me.TagReport.Report.Application.DoCmd.Requery'的整个讨论,而不是仅仅是'Me.TagReport。 Requery'? – Aiken 2014-09-08 08:14:44