How to read/write tables through VBA

D

David

I am redesigning a system. Several key tables and
relationships have changed.

To vastly oversimplify, there were two major tables but
now a third table will sit in the middle with links to the
previous tables.

The data to build the new tables is sitting around in
existing tables but I need to extract it and load it to
the new tables. Autonumber keys are involved.

How do I do this? I need VBA code to read tables, apply
selection and filtering logic and spit out the new tables.
I need the ability to change the values in some columns.
I think its too complex for a query.

Any help appreciated.
 
A

Adrian Jansen

There are good examples in the help files about how to open a recordset,
step through it record at a time, and write data.

Look up "Recordset", "MoveNext", "Update", and "Edit" for a start.

But at the same time consider doing the bulk of the work with queries, and
just the final touch-up with VBA code. Its usually easier.

--
Regards,

Adrian Jansen
J & K MicroSystems
Microcomputer solutions for industrial control
 

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