Hi im very new to all this programing lark but was wondering if some one could tell me what im doing wrong, I am tring to creat a login box so you have to enter the corect details to use my form but it keeps filling in the textboxes with the correct info when you hit ok. I hope some one can point out what im doing wrong its probably something really stupid ;). Hers is my code
Private Sub cmdLogin_Click()
Dim password As String
Dim username As String
username = "admin"
password = "secret"
Me.Txtuser.Text = username
Me.Txtpass.Text = password
If username = "admin" And password = "secret" Then
MsgBox("Access Granted", vbOK, "Welcome to West One Admin ")
WestOneAdmin.Show()
Else
MsgBox("Please Try Again")
End If
End Sub
Many Thanks in advanced