开发者

MS Access How can I show the query name in a report

开发者 https://www.devze.com 2023-03-26 05:34 出处:网络
If I make a report in MS Access then it is possible to let the program automatically fill in the name of the report, the actual time, the name of the report etc with the help of the code [name] Date()

If I make a report in MS Access then it is possible to let the program automatically fill in the name of the report, the actual time, the name of the report etc with the help of the code [name] Date() Time()

My question is if it is also possible that the program shows the query name (which is used for the report) on the report.

I have some reports 开发者_JS百科on which I frequently change the query and it would be nice if the report automatically shows the name from the used query.


This method worked for me with Access 2003.

I added an unbound text box, txtRecordSource, to the report footer. Then used this for the footer's format event.

Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer)
    Me.txtRecordSource = Me.RecordSource
End Sub
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号