MS ACCESS中的用户和密码 [英] User and Password in MS ACCESS

查看:105
本文介绍了MS ACCESS中的用户和密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在MS Access中创建一个数据库程序我会在LOGIN表单中获得一个USER和PASSWORD的帮助。如果在表中给出了USER和PASSWORD,那么我们将在程序之外输入数据库或发出错误。


我不想在提及USER和PASSWORD时提及vb代码。


请帮助。



Kartik

解决方案

< blockquote> hi

如果有2个文本框即name和psword,表名是logintable,包含用户名和密码字段,那么是

那么

如果name = DLookup(" username"," logintable"," [password] =''"& psword&"''")那么

做点什么

else Msgbox""


嗨!!!


有什么选择,因为当我创建一个表单链接到登录表并输入每个用户和密码,我希望用户输入用户名和密码,如果用户名和密码与登录表匹配,则应该继续或者它应该显示错误信息。


谢谢&再见


Kartik


enambo

您是否已经创建了一张桌子?

这是一个例子


说你有一个名为tblUsers的表,其中有两个字段UserID和Pswd

现在一个简单的表单示例,你会有一个表单有两个提示txtUser和txtPswd以及一个名为cmdLogin的按钮



例如

展开 | 选择 | Wrap | 行号


I am making a database program in MS Access I would to get help in giving a USER and PASSWORD in LOGIN Form. If the USER and PASSWORD is given in Table then we are entering the database else out of program or give an error.

I do not want to give the USER and PASSWORD to be mentioned in vb codes.

Please Help.


Kartik

解决方案

hi
if there are 2 textboxes namely name and psword and table name is logintable containing username and password fields which are texts then
then
If name = DLookup("username", "logintable", "[password]= ''" & psword & "''") Then
do some thing
else Msgbox ""


Hi!!!

Is there any option because when i create a form linking to the table of login and enter everyone user and password, i want the user to to enter the username and password , if the user name and password matches the login table, then it should continue or else it should show an error message.

thanks & bye

Kartik


enambo
Have u got a table created already?
here is an example

say u had a table called tblUsers, in it are two fields UserID and Pswd
Now a simple form example, u would have a form with two prompts txtUser and txtPswd and a button called cmdLogin

U would use the click event of cmdLogin to add your code

eg

Expand|Select|Wrap|Line Numbers


这篇关于MS ACCESS中的用户和密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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