I
IKMD66
Hi,
I would appreciate your assistance with some VBA. I have to receive data in
a semi-structured vertical format and have worked through how to get this
into a useable format in the database.
The issue I have is the the number of columns vary depending on the
originating doument - whilst I could replicate the number of queries and
hardcode.
However I think there should be a better way....depending on the field count
I want to (would like to) pass a variable to the SQL for the query in VBA and
just simply loop a counter until the total fieldf count is reached.
The logic for the query is below:
db.Execute ("INSERT INTO tblInterim ( A, [Original ID] )
SELECT tblIdocImport.F19, tblIdocImport.ID
FROM tblIdocImport
WHERE (((tblIdocImport.F19) Is Not Null))"), dbFailOnError
"F19" is the variable that I want to change each time in the loop.
Any pointers on how to do this is appreciated.
Many Thanks,
Kirk
I would appreciate your assistance with some VBA. I have to receive data in
a semi-structured vertical format and have worked through how to get this
into a useable format in the database.
The issue I have is the the number of columns vary depending on the
originating doument - whilst I could replicate the number of queries and
hardcode.
However I think there should be a better way....depending on the field count
I want to (would like to) pass a variable to the SQL for the query in VBA and
just simply loop a counter until the total fieldf count is reached.
The logic for the query is below:
db.Execute ("INSERT INTO tblInterim ( A, [Original ID] )
SELECT tblIdocImport.F19, tblIdocImport.ID
FROM tblIdocImport
WHERE (((tblIdocImport.F19) Is Not Null))"), dbFailOnError
"F19" is the variable that I want to change each time in the loop.
Any pointers on how to do this is appreciated.
Many Thanks,
Kirk