T
tope12
Im trying to make a form where the user will be able to pick an xml file and
import it to access. When I run the form, i get an error saying "Method
'ImportXML' of object'_Application' failed" This is code i used.
Private Sub Command2_Click()
Dim strfilter As String
Dim strInputFileName As String
strfilter = ahtAddFilterItem(strfilter, "XML Files (*.XML)", "*.XML")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strfilter, OpenFile:=True, _
DialogTitle:="Please select an input file...", _
Flags:=ahtOFN_HIDEREADONLY)
Text0.Value = strInputFileName
End Sub
Private Sub Command3_Click()
Dim strfilter2 As String
strfilter2 = Text0.Value
'It highlights this area of the code below
Application.ImportXML _
DataSource = strfilter2, _
ImportOptions = acAppendData
End Sub
import it to access. When I run the form, i get an error saying "Method
'ImportXML' of object'_Application' failed" This is code i used.
Private Sub Command2_Click()
Dim strfilter As String
Dim strInputFileName As String
strfilter = ahtAddFilterItem(strfilter, "XML Files (*.XML)", "*.XML")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strfilter, OpenFile:=True, _
DialogTitle:="Please select an input file...", _
Flags:=ahtOFN_HIDEREADONLY)
Text0.Value = strInputFileName
End Sub
Private Sub Command3_Click()
Dim strfilter2 As String
strfilter2 = Text0.Value
'It highlights this area of the code below
Application.ImportXML _
DataSource = strfilter2, _
ImportOptions = acAppendData
End Sub