PC Review


Reply
Thread Tools Rate Thread

access 2002 vba exportXML method bug

 
 
jeff maultby
Guest
Posts: n/a
 
      2nd Nov 2003
Hi
Found bug with ExportXML method when query is used to
populate form. Can anyone help with a fix please?

To reproduce please do the following:
Access 2002

Create new db

Create 2 simple master detail tables, use the wizards for
contacts &
orders, relate orders to contacts via contact id. Contact
tabel has ContactID, firstname, lastname. Orders table
has OrderID, ContactID, PurchaseOrderNumber.

Create 2 forms for each table, use the wizards.

Add command button to contact form. In command button
code add
"DoCmd.OpenForm Orders".

Add query named "Orders Query" with content of
SELECT Orders.OrderID, Orders.ContactID,
Orders.PurchaseOrderNumber
FROM Orders
WHERE Orders.ContactID=Forms!Contacts!ContactID;

In Record Source properties of Orders form select "Orders
Query".

Run Contacts form and see that orders form opens and
shows only those
orders for the current contact in the contact form.

Add command button to orders form labelled "Export XML"
and named
cmdExportXML.

In code for cmdExportXML button add
"Application.ExportXML
acExportForm, "Orders", "Orders.xml","Orders.xsd", "Orders
..xsl"

Run contacts form, click orders button, click Export XML
button and note
that a dialog opens asking for Forms!Contacts!ContactID

This does not happen with the form. Neither does it
happen with OutputTo
method which correctly generates XLS, RTF etc without
prompting.

I have a very small access 2002 mdb file which replicates
this problem, if u wish it please email me.

Jeff


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ExportXML Method Mike Microsoft Access External Data 0 4th May 2010 05:41 PM
ExportXML Method Joshua A. Booker Microsoft Access Queries 0 8th Jan 2009 07:29 PM
ExportXML Method Joshua A. Booker Microsoft Access Reports 0 8th Jan 2009 07:29 PM
access 2002 exportXML method bug jeff maultby Microsoft Access Forms 3 5th Nov 2003 09:31 PM
access 2002 vba and exportXML method jeff maultby Microsoft Access VBA Modules 2 4th Nov 2003 01:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:08 AM.