Edit a recordset

A

Allie

I have 10 fields in a datasheet sub form, if a particular
criteria is met 5 of those fields are added to a table
(tableB), using the recordset and the Addnew method.

If the value of one of the 5 fields changes I would like
to have it change in tableB. I have tried using the
recordset and the Edit method but it is adding another
record to tableB.

Any suggestions?

Thanks
 
P

Paul

Check the options you have set when opening the recordset.

You need to move to the record you want to edit, then use:

rs.edit
rs.Field1 = "X"
rs.Field2 = "y"
rs.update

Are you using ADO or DAO? Look under Tools/References when you are in the
Dev Environment. The syntax for the find method and the open method differs
between the two methods of data access. ADO is the newer method and is the
default from Access 2K onwards (though DAO still works in the latest
version).

I hope that is of some help.

Paul
 

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