Home > Archive > MS Access database support > February 2006 > complex insert and vba









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author complex insert and vba
sadiewms

2006-02-20, 8:25 pm

I'm trying to get data from one table into another. The data in the
first table - Table A - is something like this:

personfn, personln; personfn, personln; personfn, personln

I would like to split the field and then input a new record for each
string into Table B

I'm guessing that I should do this all in VBA (because I can't find
another way to do it)

So I need to:
loop through each field in Table A
split column A on semicolon using split()
loop through array and insert strings into the field in Table B

I'm stuck trying to figure out how to get the data from a select
statement using VBA. I know I can use RunSQL for the insert. I'm also
unsure of how to do loops

My knowledge of VBA is very very limited. Can anyone give me a start?

Thanks!

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com