How to use VBA to step through a table? -
06-29-2008
, 01:11 PM
I am an old FoxPro programmer having trouble transitioning to Access,
and I have a hot project to work on.
I have a record for a company. That record has a field of account
numbers. The account number field can have from 1 to 16 account
numbers in it, separatd by a ; or semicolon. (Shades of PICK).
How do I convert this type of record
ABC Co, Main Street, Anywhere, PA, 1234;1237;1239;1290
to this
ABC Co, Main Street, Anywhere, PA, 1234
ABC Co, Main Street, Anywhere, PA, 1237
ABC Co, Main Street, Anywhere, PA, 1239
ABC Co, Main Street, Anywhere, PA, 1290
How do I do it in Access?
Mainly I can't find references to do what I thought were common
database functions, such as
1. stepping through a table's recrods and
2. adding a record to a second table based on some sort of processing
logic.
Here is a simpilified version of what I would do if I were to do it in
Foxpro
use Table1
use Table2
select Table1 - change to Table1
do while not EOF() - end of file
test for necessary condition to add more records
do procedure add a record & loop through if necessayr
skip to next record
enddo
procedure add a record to a second table
do processing
end procedure
Any help would be appreciated |