Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

creating xml file using vb code in access 97 form

Status
Not open for further replies.

maudedo

MIS
Jul 10, 2003
41
GB
Hello

I am trying to send an email using access. This email will have an xml attachment, the details of which will be the results of data in a form.

I have created the code for the email, and to attach the file and this works ok. However, everytime I try to read the resulting xml file, i receive the following error, and can not understand what is wrong with the xml code. this is my first attempt at xml so would appreciate any help.

the error: The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


--------------------------------------------------------------------------------

Missing equals sign between attribute and attribute value. Error processing resource 'file:///C:/Documents and Settings/admin/Local Settings/Temporary Internet Files/OLK2D/XML_Inv_170680.xml'. Line 1, Position 20

<Actual Completion details>



the vb code to create the xml file:

Open strfilename4 For Output As #1
Print #1, "<Actual Completion details>"
Print #1, "<LQ_PCSNo>" & stph & "</LQ_PCSNo>"
Print #1, "<LQ_CompleteDT>" & Format(stcompleted, "dd-mmm-yyyy") & " " & Format(stcompleted, "Short time") & "</LQ_CompleteDT>"
Print #1, "<LQ_PHSignoffDT>" & Format(stccdate, "dd-mmm-yyyy") & " " & Format(stccdate, "Short time") & "</LQ_PHSignoffDT>"
Print #1, "<LQ_CCSigned>" & stccrec & "</LQ_CCSigned>"
Print #1, "<LQ_NetInvVal>" & stinv & "</LQ_NetInvVal>"
Print #1, "<LQ_VatInvVal>" & stvat & "</LQ_VatInvVal>"
Print #1, "<LQ_ExcessPaid>" & stexcess & "</LQ_ExcessPaid>"
Print #1, "<LQ_GrossInvVal>" & stgross & "</LQ_GrossInvVal>"
Print #1, "</Actual Completion details>"
Close #1

anyone have any ideas?
many thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top