Solved

Application.ImportXML

Posted on 2004-08-29
2
1,313 Views
Last Modified: 2012-05-05
I am trying to use the following command in VB code in an Access 2003 data project:

Application.ImportXML (filename) acAppendData

I am getting an error when I try to call this code.  Do I need to dim something special?  I can run the command manually under FILE/Get External Data / Import / XML and successfully import the file.

What am I doing wrong?

HELP!!!!!
0
Comment
Question by:StardustMan
2 Comments
 
LVL 5

Accepted Solution

by:
WesleySaysHi earned 500 total points
ID: 11928083
Correct Subroutine to import data and structure of a xml file:

Private Sub ImportXMLFile()

   Const STRUCTURE_AND_DATA = 1

   Application.ImportXML DataSource:="filename.xml", _
       ImportOptions:=STRUCTURE_AND_DATA

End Sub

Regards,

Wesley
0
 

Author Comment

by:StardustMan
ID: 11928144
Thanks so much.

0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A short article about problems I had with the new location API and permissions in Marshmallow
This is about my first experience with programming Arduino.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question