+ Reply to Thread
Results 1 to 2 of 2

VBA script to validate user entry to access database

  1. #1
    Registered User
    Join Date
    12-19-2012
    Location
    Sheffield
    MS-Off Ver
    Excel 2003
    Posts
    1

    VBA script to validate user entry to access database

    Hello All

    I'm trying to add an auto-login function to a database, that will recognise users already logged in to the network through a VBA script that will:

    1 - Recognise the user details trying to gain access to the db (using the environ variable)
    2 - Validate their details against the table of registered users
    3 - If they are listed, allow them access, If not exit the app with an approprate message.

    I have got so far with this but cannot get the script to work properly.
    Can anybody help me please?

    For clarity:

    TblStaff is the table containing staff data

    Within the table:

    Staff_Number is the field being searched to validate the entry
    Current is a ticked-box field confirming that the staff member is working on the correct team

    Please Login or Register  to view this content.

  2. #2
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: VBA script to validate user entry to access database

    In Access, it's hard to validate VBA without an attached database. What about it is not working?

    I can already see that you need to go to the end of the recordset before you test the recordcount.
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1