设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

12
返回列表 发新帖
楼主: gxy1000
打印 上一主题 下一主题

[Access本身] 操作日志的用户名怎样才能是登入用户名?

[复制链接]
11#
发表于 2012-8-27 16:19:52 | 只看该作者

Public Sub WriteLog(Ope As String, Cap As String)
    UserName = DLookup("用户名", "用户表", "用户id=" & UserID)
    DoCmd.SetWarnings False
    DoCmd.RunSQL "insert into Log ( UserName,PC,Operation ) select '" & UserName & "',fOSMachineName(),'" & Ope & Cap & "';"
    DoCmd.SetWarnings True
End Sub
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-6 13:28 , Processed in 0.072763 second(s), 23 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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