Access 2013识别用户的新记录 [英] Access 2013 identifying user for new records

查看:93
本文介绍了Access 2013识别用户的新记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我的第一篇文章所以请保持温和:)

My first post so please be gentle :)

我有一个访问程序,其中有三个不同的计算机/用户在表格中输入新记录。我想知道在字段中使用 用户标记每条记录的最佳方法,以便可以过滤表格以仅显示一个用户的条目。
我知道它可以通过他们输入的字段手动完成,但如果它是根据输入的计算机自动完成的话会更好。 可以在启动程序并存储时输入变量需要时参考?

I have an Access program where three different computers/ users enter new records into a table. I would like to know the best way to tag each of these records with the user in a field, so that the table can be filtered to show just one user's entries. I know it can be done manually with a field that they would enter but it would be nicer if it was done automatically based on the computer doing the input. Can a variable be entered when they start their program and stored to reference when needed?

提前感谢您的建议

Dave

推荐答案

简单的方法是从Windows环境变量中获取它:

The easy method would be to grab it from the Windows environment variable:

UserName = Environ("USERNAME")

您还可以使用Windows API检索经过Windows身份验证的用户:

You can also use the Windows API to retrieve the Windows authenticated user:

https://stackoverflow.com/questions/677112/how-to-get-logged-in-users -name-in-access-vba


这篇关于Access 2013识别用户的新记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆