在 MS Access 中通过 FileDialog 保存时如何过滤报表对象
我正在尝试使用 FileDialog 保存 rtf 文件,并希望使用 where 子句进行过滤。 这就是我所拥有的:
Set dlgSave = FileDialog(msoFileDialogSaveAs)
With dlgSave
.Title = "Provide the place to save this file"
.ButtonName = "Save As..."
.InitialFileName = Me.cmbPickAReportToPrint.Value & "-" & Format(Date, "mmddyy") & ".rtf"
.InitialView = msoFileDialogViewDetails
If .Show Then
DoCmd.OutputTo acOutputReport, Me.cmbPickAReportToPrint.Value, acFormatRTF, .SelectedItems(1)
End If
End With
关于如何添加 where 子句而不更改报告的任何想法?
I am attempting to save an rtf file using FileDialog and would like to filter using a where clause. This is what I have:
Set dlgSave = FileDialog(msoFileDialogSaveAs)
With dlgSave
.Title = "Provide the place to save this file"
.ButtonName = "Save As..."
.InitialFileName = Me.cmbPickAReportToPrint.Value & "-" & Format(Date, "mmddyy") & ".rtf"
.InitialView = msoFileDialogViewDetails
If .Show Then
DoCmd.OutputTo acOutputReport, Me.cmbPickAReportToPrint.Value, acFormatRTF, .SelectedItems(1)
End If
End With
Any ideas as to how I could add the where clause without otherwise changing the report?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现在不接触报告代码本身的情况下执行此操作的最简单方法是在应用过滤器的预览模式下打开报告,然后将报告输出为您需要的任何格式。
I've found that the easiest way to do this without touching the report code itself is to open the report in preview mode with the filter applied, and then output the report to whatever format you need.