Re: ExportXML
- From: Leslie <Leslie@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 23 Oct 2008 12:14:02 -0700
Thank you. I thought I had already tried that, but I guess not because it
worked. The sample code, taken from Business Solutions Access 2007 VBA book,
used single ' marks around the source, which is why I used the single vs
double.
Thanks again for your help.
Leslie
"Alex Dybenko" wrote:
Hi,.
you have to put string arguments in double quotes, try:
ExportQuery "HuntGroups", "c:\lesliero\documents\", "HuntGroups.xml"
--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
"Leslie" <Leslie@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:36C09A58-F915-415E-9795-7FB5144B4A8A@xxxxxxxxxxxxxxxx
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
- References:
- ExportXML
- From: Leslie
- Re: ExportXML
- From: Alex Dybenko
- ExportXML
- Prev by Date: Calendar control today method not working until form reload (?)
- Next by Date: Re: age calculation
- Previous by thread: Re: ExportXML
- Next by thread: Parameter range in DoCmd.OpenReport
- Index(es):
Relevant Pages
|