Hi Friends,
I am a newbie in MS ACCESS. I am using A2010 Version. What I am expecting my code to do is: Compare the field of the table and update other field in the same row.
My code will make sense better htan words :)
Need urgent help. Please provide valuable feedback.
I am a newbie in MS ACCESS. I am using A2010 Version. What I am expecting my code to do is: Compare the field of the table and update other field in the same row.
My code will make sense better htan words :)
Code:
Dim zDB As DAO.Database
Dim zRS As DAO.Recordset
Dim zSQL As String
'
zSQL = "UPDATE AddUser SET [Password]='" & Pwd & "' WHERE AddUser.EmployeeId='" & User & "';"
'
'See here is where I set the pointer to the current
'database only once
Set zDB = CurrentDb
'
'using recordsets...
[B]Set zRS = zDB.OpenRecordset(zSQL, dbOpenSnapshot) 'getting ERROR in this line
[/B] '
'
zRS.close
If Not zRS Is Nothing Then Set zRS = Nothing
If Not zDB Is Nothing Then Set zDB = Nothing
Comment