设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

返回列表 发新帖
查看: 1927|回复: 3
打印 上一主题 下一主题

[报表] 请问如何记录报表被打印的次数?

[复制链接]
1#
发表于 2012-6-20 14:32:34 | 显示全部楼层
建议在表中增加一字段来保存打印的次数
2#
发表于 2012-6-20 14:51:49 | 显示全部楼层
给你个思路,自己完善
  1. Private Sub Command5_Click()
  2.     Dim stDocName As String
  3.     Dim strSQL As String
  4.     Dim lngTimes As Long
  5.     If IsNull(Me.OrderID) Then Exit Sub
  6.     lngTimes = Me.打印次数 + 1
  7.     stDocName = "rptOrders"
  8.     DoCmd.OpenReport stDocName, acViewPreview    'acViewNormal
  9.     strSQL = "update Orders set PrinTimes=" & lngTimes & " where [orderid]=" & Me.OrderID
  10.     CurrentDb.Execute strSQL
  11.     Call OrderID_AfterUpdate
  12. End Sub
复制代码

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-5-23 02:25 , Processed in 0.082244 second(s), 25 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表