Results 1 to 3 of 3

Thread: Logging In To Access Via VB

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Location
    Antrim
    Posts
    80

    Question

    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.

  2. #2
    Lively Member
    Join Date
    Aug 1999
    Location
    Blackpool, England
    Posts
    87
    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.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Location
    Antrim
    Posts
    80
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width