Results 1 to 11 of 11
  1. #1
    thompjas is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2015
    Posts
    13

    Help required with a Single Record Query

    Hi,

    I have managed to set up a query that displays the current record in my dummy database using the ID number of the current record within my form using the following

    [Forms]![CustomerForm]![ID]

    so far all works and only one record is shown

    Now I want to export the query data as an XML file when I export using the built in tools I get a pop up window asking for entering the parameter value - Forms!CustomerForm!ID

    What am I doing wrong ??



    I am working my way towards an automated XML output and a SetValue change (setValue part is working already...!)

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    If the form is open, that prompt should not happen.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    thompjas is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2015
    Posts
    13
    So an undocumented feature !

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I don't know why this is happening in your db, just that it shouldn't. If you want to provide for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    thompjas is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2015
    Posts
    13
    I have created a sample Database using the query that is in my larger database

    to summarise - the query shows the customer name as defined in the 'open' form - I then want to export the queury to XML but I am asked to enter a parameter value - interestingly I am not prompted when exporting as a TXT file....


    Any help gratefully received -

    thanks

    Jason
    Attached Files Attached Files

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    The query is set up using Customer Name to filter records, not ID. I tested with both and don't get the popup input prompt. Export occurs without issue.


    Recommend no spaces or special characters/punctuation (underscore is exception) in naming convention.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    thompjas is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2015
    Posts
    13
    Cheers, I have now amended all fields so no spaces, still get a prompt when I try an XML export !!

    What am I missing...?

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I cannot replicate the issue with the db you posted.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    thompjas is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2015
    Posts
    13
    That's annoying ! and you can use the XML export function ?

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    That's what I did. However, just tried again and now getting the issue!!!!! Cannot remember what I did before.

    A solution appears to be described in http://bytes.com/topic/access/answer...eter-query-xml

    It suggests using VBA command DoCmd.RunCommand acCmdExportXML
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #11
    thompjas is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2015
    Posts
    13
    Wahooo, looks as though you have found a solution to my issue !!

    Thanks for your help !!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 11-22-2014, 07:50 AM
  2. Append Query For Single Record
    By burrina in forum Forms
    Replies: 8
    Last Post: 01-04-2013, 05:12 PM
  3. Append Query For Single Record
    By burrina in forum Queries
    Replies: 3
    Last Post: 12-30-2012, 11:23 PM
  4. Query record set into single excel row
    By bruegel in forum Queries
    Replies: 10
    Last Post: 07-09-2012, 08:20 AM
  5. Single Record Update Query from a Form
    By Steven.Allman in forum Access
    Replies: 0
    Last Post: 03-30-2011, 09:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums