PDA

Click to See Complete Forum and Search --> : Logging In To Access Via VB


Rob Brown
May 22nd, 2000, 08:22 PM
Hi,

I'm building a VB5 front end for an Access 97 database and require users to log in at startup.

I have a form with the following objects on it for this purpose:

txtUserName - text box
txtPassword - text box
cmdOK - command button
cmdCancel - command button

How do I go about using these objects to log the user into the database (or more importantly to not log them in if they don't have a valid user-name/password).

Any help would be much appreciated.

Best Regards,

Rob Brown.

SteveFlitIII
May 22nd, 2000, 08:40 PM
Rob,
Have you created a user table in the Database, if so can you tell me the structure.
The basic way to do this is to open a connection to the DB and
Select * from users then loop through all recordset to see if you get a match with the username and password that the user has typed in. You can create system users using the mdw file that is Access own internal security but this can be complicated.

Rob Brown
May 22nd, 2000, 09:04 PM
No I haven't created a users table.

What columns do I need to put in it?

The database is called sid.mdb and is located at:

D:\Databases\sid\sid.mdb

I am new to database programming so I don't know anything about user/group level security.

I will need to incorporate an admin group as well as a users group 2. I hope this doesn't complicate the issue too much.

Thanks for taking the time to help me out.

Rob Brown.