dreid1011
Well-known Member
- Joined
- Jun 4, 2015
- Messages
- 3,638
- Office Version
- 365
- Platform
- Windows
Good morning,
I have a macro that I converted to VB so I can export multiple tables to individual .txt files.
Here's what I have:
I've set up an array for all the table names, and that seems to work fine. It gets through the first table, and then I receive an error stating that my second table(bold entry above) does not exist, but it's not the correct name in the error.
Imgur
Any help is much appreciated, thanks!
I have a macro that I converted to VB so I can export multiple tables to individual .txt files.
Here's what I have:
Code:
Function Quarterly_Export_Macro()
On Error GoTo Quarterly_Export_Macro_Err
Dim strName() As Variant
Dim i As Integer
strName = Array("MS_ACCOUNT", "[COLOR="#FF0000"][/COLOR][B]MS_EXEMPTIONS[/B]", "MS_FLOORS", "MS_INVENTORY", "MS_NOTATIONS", "MS_SPECIAL_ASSESSMENT", "MS_VALUE_SUMMARY", "ORCATS_NAMES", "P_ACCOUNT", "P_VALUES", "R_FLOOR_INV", "R_IMPR_ACC", "R_SPECIAL_ASSESSMENT", "REAL_ACCOUNT", "REAL_DEAD_NUMBERS", "REAL_EXEMPTIONS", "REAL_IMPROVEMENTS", "REAL_LAND_ADJUSTMENTS", "REAL_LAND_SIZES", "REAL_LAST_SALE", "REAL_LEGAL", "REAL_MAP_XREF", "REAL_NOTATIONS", "REAL_SALES", "REAL_SALES_ACCOUNTS", "REAL_SITUS", "REAL_VALUE_SUMMARY", "REAL_VALUES", "TAX_TOTALS", "TAXES_DELINQUENT", "tblFIELD_DESCRIPTIONS", "U_ACCOUNT", "U_VALUES")
For i = 0 To 33
DoCmd.TransferText acExportDelim, "QExportSpecs", strName(i), "F:\Quarterly Exports\" & strName(i) & ".txt", True
Next
Quarterly_Export_Macro_Exit:
Exit Function
Quarterly_Export_Macro_Err:
MsgBox Error$
Resume Quarterly_Export_Macro_Exit
End Function
I've set up an array for all the table names, and that seems to work fine. It gets through the first table, and then I receive an error stating that my second table(bold entry above) does not exist, but it's not the correct name in the error.
Imgur
Any help is much appreciated, thanks!