Create a Record Set, Then Update Table from Record Set

G

Guest

I would appreciate some help to do the following: create a record set,
filter the record set and then with the filtered results, update a table. I
can start the process, but get stuck. Here is my attempt:

Dim db as DAO.Database
Dim rst as DAO.Recordset
Dim stSql as String

Set db = CurrentDB
Set rst = db.OpenRecordset("SQL_Query")

stSql ="Insert into "& rst.fields("Field1") & rst.filter = FieldYesNo=True

Here I wish to create a query to filter certain records and selects certain
fields to be append to a Table, but don't know how to do this. Your help
will be greatly appreciated.
 
A

Alex Dybenko

Hi,
if you run filtered update query - it will also run it on 3500 records only.
I am not sure I understand your idea with recordset, but anyway - if you
want to filter recordset - you can use .Filter property:

rstTemp.Filter = strField & " = '" & strFilter & "'"
Set FilterField = rstTemp.OpenRecordset


--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
 

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