Results 1 to 2 of 2

Thread: Please help

  1. #1
    Join Date
    Jan 2004
    Posts
    5

    Red face Unanswered: Please help

    I am having a problem with my password script I would like to allow the user to change the password by altering a entry in a table but I am having a problem relating the entry to the password script:

    rivate Sub Command2_Click()
    On Error Resume Next
    Dim pwd As String
    pwd = admin table entry
    If pwd = Table Then
    MsgBox "Correct Password"
    Dim stDocName As String
    Dim stLinkCriteria As String
    DoCmd.Close
    stDocName = "Admin Area"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

    Else
    MsgBox "Incorrect Password"
    DoCmd.Close
    End If
    End Sub

    Can someone suggest how to get the code to check the entry in:
    table = admin
    field = password

    This would be much appreciated,

    §imon Wedge

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: Please help

    Originally posted by wedge9s
    I am having a problem with my password script I would like to allow the user to change the password by altering a entry in a table but I am having a problem relating the entry to the password script:

    rivate Sub Command2_Click()
    On Error Resume Next
    Dim pwd As String
    pwd = admin table entry
    If pwd = Table Then
    MsgBox "Correct Password"
    Dim stDocName As String
    Dim stLinkCriteria As String
    DoCmd.Close
    stDocName = "Admin Area"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

    Else
    MsgBox "Incorrect Password"
    DoCmd.Close
    End If
    End Sub

    Can someone suggest how to get the code to check the entry in:
    table = admin
    field = password

    This would be much appreciated,

    §imon Wedge
    Well you can do it either DAO or ADO ... Pick your poison. Using DLookUp would be a line like:

    dim CurrentPassword As String

    CurrentPassword=DLookUp("[admin]","[password]")

Posting Permissions

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