L
Leslie
I am having problems trying to use the ExportXML function. The following is
my code, but when I try to run from the immediate window, I get a compile
error. I did not get any message when I compiled. Anyone know what is wrong
here? ...and thanks!
The message I get when I run from immediate window is:
"Compile error: Argument not optional"
Immediate Window:
ExportQuery 'HuntGroups', "c:\lesliero\documents\", 'HuntGroups.xml'
Code:
Public Sub ExportQuery(strSource As String, strPath As String, strTarget As
String)
On Error GoTo Err_ExportQuery
Access.Application.ExportXML acExportQuery, strSource, strPath & strTarget
Exit_ExportQuery:
Exit Sub
Err_ExportQuery:
Call LogError(Err.Number, Err.Description, "'" & conMod & "'" & " -
ExportQuery()")
MsgBox prompt:="Error Number: " & Err.Number & vbCrLf _
& Err.Description, _
buttons:=vbCritical + vbMsgBoxHelpButton, _
Title:="Error!", _
HelpFile:=Err.HelpFile, _
context:=Err.HelpContext
Resume Exit_ExportQuery
End Sub
my code, but when I try to run from the immediate window, I get a compile
error. I did not get any message when I compiled. Anyone know what is wrong
here? ...and thanks!
The message I get when I run from immediate window is:
"Compile error: Argument not optional"
Immediate Window:
ExportQuery 'HuntGroups', "c:\lesliero\documents\", 'HuntGroups.xml'
Code:
Public Sub ExportQuery(strSource As String, strPath As String, strTarget As
String)
On Error GoTo Err_ExportQuery
Access.Application.ExportXML acExportQuery, strSource, strPath & strTarget
Exit_ExportQuery:
Exit Sub
Err_ExportQuery:
Call LogError(Err.Number, Err.Description, "'" & conMod & "'" & " -
ExportQuery()")
MsgBox prompt:="Error Number: " & Err.Number & vbCrLf _
& Err.Description, _
buttons:=vbCritical + vbMsgBoxHelpButton, _
Title:="Error!", _
HelpFile:=Err.HelpFile, _
context:=Err.HelpContext
Resume Exit_ExportQuery
End Sub