多用户登录屏幕 - 有关跟踪登录用户的问题 [英] Multi user login screen - question about tracking logged in users

查看:60
本文介绍了多用户登录屏幕 - 有关跟踪登录用户的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我目前有一个可用的多用户登录表单,可自动将用户引导至相关表单,例如一般工作人员可以访问名为staff1和staff2的表单,而管理人员可以访问名为manager1的表单。我使用了以下代码:

Hi,

I currently have a working multi user login form which automatically directs users to the relevent forms e.g. general staff have access to a form called staff1 and staff2 whereas managers have access to a form called manager1. I have used the following code:

展开 | 选择 | Wrap | 行号

推荐答案

我使用了很多的组合多年来采用了不同的技术。


首先我有一个用户表,其中包含以下字段:

PK_User(自动编号,主键)

tx_UserInitials(在我的情况下匹配登录用户的用户名)(文本字段)

tx_FirstName(文本字段)

tx_LastName(文本字段)

b_Admin(是/否字段)



登录时creen,您可以捕获用户名,并将其与用户表中的ID匹配。这可以在登录表单中打开事件

I use a combination of alot of different techniques picked up over the years.

First I have a table of users with the fields:
PK_User (Autonumber, primary key)
tx_UserInitials (in my case matching the username of people logged in) (Text Field)
tx_FirstName (Text Field)
tx_LastName (Text Field)
b_Admin (Yes/no field)


In your login screen, you can capture the username, and match it to a ID in your user table. This could be done in the login forms open event

展开 | 选择 | Wrap | 行号


首先感谢您的帮助。


只需提出一个问题,我是否需要在登录表单上使用您的代码而不是我的代码?或者它是我的代码之外的。对不起,这感觉就像一个愚蠢的问题,但我很难访问。
Firstly thanks for your help.

Just one question, do I need to use your code instead of my code on the login form? or is it in addition to my code. Sorry, this feels like a stupid question but I am very new to access.


以上只是一个如何记录登录数据库的用户以及如何使用该信息的示例用他的userID标记记录。在这一点上,我的代码都没有真正涉及用户拥有的权限。这可以在用户表中或单独的表中设置。
The above is simply an example of how to record the user logging into the db, and how to use that information to mark records with his userID. At this point none of my code really relates to what rights the user has. This could be setup in a the user table, or in a seperate table.


这篇关于多用户登录屏幕 - 有关跟踪登录用户的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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