I have the following code:
Public Sub ExportADOXML(strTableName As String, f As String)
' Export the specified table as XML, using the
' ADO XML format rather than native Access format
Dim rst As ADODB.Recordset
On Error GoTo HandleErr
Stop
Set rst = New ADODB.Recordset
rst.Open strTableName, CurrentProject.Connection
rst.Save f, adPersistXML
rst.Close
Set rst = Nothing
ExitHere:
Exit Sub
HandleErr:
MsgBox Err.Number & ": " & Err.Description, vbCritical, _
"ExportADOXML"
Resume ExitHere
End Sub
I test it in immediate window like ExportADOXML("tblCompany", "Lew") and it keeps bombing saying "Compile error expected = "
Please Help!
TIA
Lewie
Public Sub ExportADOXML(strTableName As String, f As String)
' Export the specified table as XML, using the
' ADO XML format rather than native Access format
Dim rst As ADODB.Recordset
On Error GoTo HandleErr
Stop
Set rst = New ADODB.Recordset
rst.Open strTableName, CurrentProject.Connection
rst.Save f, adPersistXML
rst.Close
Set rst = Nothing
ExitHere:
Exit Sub
HandleErr:
MsgBox Err.Number & ": " & Err.Description, vbCritical, _
"ExportADOXML"
Resume ExitHere
End Sub
I test it in immediate window like ExportADOXML("tblCompany", "Lew") and it keeps bombing saying "Compile error expected = "
Please Help!
TIA
Lewie