Login System (Need help with problem)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dave Siegel
    New Member
    • Feb 2007
    • 42

    #1

    Login System (Need help with problem)

    Hi.

    I know what im doing wrong but i dont know how to fix it.

    I have the follow code

    Code:
    Private Sub Command1_Click()
        If Text2.Text = App.Path & "\members\" & Text1.Text & "\password.txt" Then
    MainForm.Show
    LoginForm.Hide
    Else
    MsgBox "Please check your Username/Pass.", vbCritical, "Wrong Login!"
    End If
    End Sub
    I know that it now just looks at the path. But i need it to read the INSIDE of the txt file. How would i manage that?
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #2
    The quick and simple way to read a text file is by using the Open command. For example...
    Code:
    Open "Text.txt" For Input Access Read Shared As #1
    Line Input #1, MyString
    Close #1
    If you want much better capabilities, look into the FileSystemObjec t, but it's a little more complex to use.

    Comment

    Working...