I'm a beginner in programming can you pliz help me create a form from this login form code
looking fowad to a helpfull reply on
malvy01@hotmail.com
Code:
[Dim r As New Recordset
Dim ct As Control
Dim cn As New Connection
Private Sub cmdexit_Click()
Unload Me
End Sub
Private Sub cmdstart_Click()
r.MoveFirst
Do While Not r.EOF
If UCase(Trim(TXTUN)) = UCase(Trim(r!Username)) And
Trim(TXTPASS) = Trim(r!Password) Then
i = 1
frmMain.Show
frmlogin.Hide
Exit Do
End If
r.MoveNext
Loop
If i = 0 Then
MsgBox "Invalid user."
TXTUser = ""
TXTPASS = ""
End If
End Sub
Private Sub Form_Activate()
TXTUN.Text = ""
TXTPASS.Text = ""
End Sub
Private Sub Form_Load()
Dim i As Integer
With cn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "data source=" & App.Path &
"\library.mdb"
.Open
End With
r.Open "select * from login", cn, adOpenDynamic,
adLockOptimistic
i = 0
End Sub]