hewstone999
Registered User.
- Local time
- Yesterday, 16:25
- Joined
- Feb 27, 2008
- Messages
- 37
I have a table (ExportTables) with the following data
ExportTables
--------------------
MPI_CODE
MPI_IDS
MPI_REFF
REFFERALS
NOK_AD
--------------------
I want some VBA code that can loop through the table above one by one returning the value. The table data will change so i would like the code to handle change as well.
I want the returning value to be returned has a string i.e. TblValue = <table data value>
Because then i want to use the value to be put in this sql query- DoCmd.RunSQL "INSERT INTO TEST_DOC SELECT * FROM " & TblValue
then loop onto the next value.
Hope you understand what im after.
ExportTables
--------------------
MPI_CODE
MPI_IDS
MPI_REFF
REFFERALS
NOK_AD
--------------------
I want some VBA code that can loop through the table above one by one returning the value. The table data will change so i would like the code to handle change as well.
I want the returning value to be returned has a string i.e. TblValue = <table data value>
Because then i want to use the value to be put in this sql query- DoCmd.RunSQL "INSERT INTO TEST_DOC SELECT * FROM " & TblValue
then loop onto the next value.
Hope you understand what im after.