|
-
March 24th, 2001, 04:18 AM
#1
username and password -access database
hello, Im having problem with accessing Access DB with username and password, I used an sql statement but it doesnt work...do you know the code to enter to A Database with username and password??
this is the code i wrote:
Private Sub Form_Load()
' connecting the DB and the table
strFileName = App.Path & "\mydatabase.mdb"
Set db = OpenDatabase(strFileName)
Set rs_lgn = db.OpenRecordset("login")
pswrd = rs_lgn![password]
usrnme = rs_lgn![UserName]
End Sub
and on the click button i wrote:
sqlstr = "SELECT * FROM rs_lgn WHERE usrnme =" & username_inpt_local & "AND pswrd = " & password_inpt_local
'Set rs_lgn_true = db.OpenRecordset("sqlstr")
and so on.. but it doesnt work..
thank you
Eli
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|