Update current record of recordset

  • Thread starter Thread starter AJ
  • Start date Start date
A

AJ

I have a simple recordset (select * from stores). Is there a way to update
the current record I am processing?

example:
update table1 set field1 = "ABC"
where ??CURRENT RECORD OF RECORDSET??

Do you have an easy example?
 
If you are using bound forms, this is automatic, just type "ABC" into the
proper textbox. If you need to update another recordset, set the recordset
to pull only the 1 record:

"Select * From Stores Where ID = '" & Me.PrimaryKeyValue & "'"

for a text Primary Key, or:

"Select * From Stores Where ID = " & Me.PrimaryKeyValue

You can use a similar Where clause in the Update statement.

"Update Table1 Set Field1 = 'ABC' Where SomeID =" & Me.KeyField
 

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

Back
Top