hi,
im new joiner and i need help doing my project. im using visual basic and ms access.
how can i retrive the data which i have added in database
i add the data with this code
[CODE=VB]
Private Sub cmd_add_Click()
Dim dbs As DAO.Database
Dim rcd As DAO.Recordset
If Me.txt_username = "" Then
MsgBox "Enter Your Name Please", , "Your Name"
Me.txt_username .SetFocus
Exit Sub
ElseIf Me.txt_password = "" Then
MsgBox "Your Password ", , " Your Password"
Me.txt_password .SetFocus
Exit Sub
Else
Set dbs = OpenDatabase(Ap p.Path & "\Names.mdb ")
Set rcd = dbs.OpenRecords et("userandpass word")
With rcd
.AddNew
rcd!UserName = Me.txt_username
rcd!Password = Me.txt_password
.Update
Me.txt_username .Text = ""
Me.txt_password .Text = ""
End With
End If
End Sub
[/CODE]
im hoping you can help me with this
regards,
im new joiner and i need help doing my project. im using visual basic and ms access.
how can i retrive the data which i have added in database
i add the data with this code
[CODE=VB]
Private Sub cmd_add_Click()
Dim dbs As DAO.Database
Dim rcd As DAO.Recordset
If Me.txt_username = "" Then
MsgBox "Enter Your Name Please", , "Your Name"
Me.txt_username .SetFocus
Exit Sub
ElseIf Me.txt_password = "" Then
MsgBox "Your Password ", , " Your Password"
Me.txt_password .SetFocus
Exit Sub
Else
Set dbs = OpenDatabase(Ap p.Path & "\Names.mdb ")
Set rcd = dbs.OpenRecords et("userandpass word")
With rcd
.AddNew
rcd!UserName = Me.txt_username
rcd!Password = Me.txt_password
.Update
Me.txt_username .Text = ""
Me.txt_password .Text = ""
End With
End If
End Sub
[/CODE]
im hoping you can help me with this
regards,
Comment