Results 1 to 2 of 2
  1. #1
    SamuelOu is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2015
    Posts
    16

    Query deleted and pops up "A query must have at least one destination field"

    I do daily excel file exporting in my database. Occasionally, it pops up an error message "A query must have at least one destination field".

    Then I open the queried and it turns out the content of queries have been deleted.

    I save the sql code in a copy to fix it. However, I wonder why is that happening and if there is anything to prevent it.

    Any suggestion will be appreciated. Thank you.

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    Are you modifying the export via VBA code? that error message is thrown when you have a SELECT query with no fields that would actually show when the query was run.

    For instance if you add a table to a query and do not add any fields and try to run it you would have a SQL statement like:

    SELECT FROM tblTestName

    If you want to find out what your process is actually trying to export use the debug.print statement to see what's actually going on I'll bet you find a query with no fields defined for export.

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

Similar Threads

  1. "Record is Deleted" error message
    By Duncan in forum Access
    Replies: 12
    Last Post: 03-13-2015, 03:10 AM
  2. Replies: 1
    Last Post: 02-05-2015, 05:41 PM
  3. Replies: 3
    Last Post: 04-10-2013, 01:20 PM
  4. Export "Query or Report" to a "Delimited Text File"
    By hawzmolly in forum Import/Export Data
    Replies: 3
    Last Post: 08-31-2012, 08:00 AM
  5. Replies: 4
    Last Post: 06-14-2010, 02:31 PM

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