Method not found

G

Guest

In this code below the "rs.Edit" gives me the error: "Method or Data Error
not found" I don't understand, I've used it before?????

If txtNewPwd = txtNewPwd1 Then
If rs.RecordCount > 0 Then
rs.MoveFirst
rs.Edit
rs!Password = txtNewPwd
rs.UPDATE
MsgBox "Password changed succesfully."
Else


Thanks
 
S

Stefan Hoffmann

hi Dan,
In this code below the "rs.Edit" gives me the error: "Method or Data Error
not found" I don't understand, I've used it before?????

If txtNewPwd = txtNewPwd1 Then
If rs.RecordCount > 0 Then
rs.MoveFirst
rs.Edit
rs!Password = txtNewPwd
rs.UPDATE
MsgBox "Password changed succesfully."
Else
It is an ADODB.Recordset. You have used DAO.Recordsets before.

btw, use an explicit Dim for rs:

Dim rs As DAO.Recordset

or

Dim rs As ADODB.Recordset

and use Option Explicit.

mfG
--> stefan <--
 
G

Guest

Hi Stefan???



Stefan Hoffmann said:
hi Dan,

It is an ADODB.Recordset. You have used DAO.Recordsets before.

btw, use an explicit Dim for rs:

Dim rs As DAO.Recordset

or

Dim rs As ADODB.Recordset

and use Option Explicit.

mfG
--> stefan <--
 
R

RoyVidar

In this code below the "rs.Edit" gives me the error: "Method or Data
Error not found" I don't understand, I've used it before?????

If txtNewPwd = txtNewPwd1 Then
If rs.RecordCount > 0 Then
rs.MoveFirst
rs.Edit
rs!Password = txtNewPwd
rs.UPDATE
MsgBox "Password changed succesfully."
Else


Thanks

You are probably intending to use a DAO recordset. It'd be easier to
judge if you'd also included the declaration.

dim rs as dao.recordset

then
set rs = currentdb.openrecordset("select blah ....
or
set rs = me.recordsetclone ' for form recordsets ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top