Results 1 to 7 of 7
  1. #1
    worldwidewall is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2012
    Posts
    23

    Query Result Export

    Hi

    I am running access 2003.

    I have created a query and I can run it and get the right results. I want to copy the results and create an Access table. I know that I can use a 'make table query' but it will not let me because I have more than one primary key in the query reults. This probably means I am breaking some database best practices but there must be a way to export the query results to a new Access table?

    Thanks

    Dave

  2. #2
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Queries don't have primary keys, only tables do. What is the exact error you get when you try to run your make table query?

  3. #3
    worldwidewall is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2012
    Posts
    23
    Hi aytee11

    The error is:

    Resultant table note allowed to have more than one autonumber field.

    Thanks for your time

    Dave

  4. #4
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    OK, this is interesting. I presume you need to keep those values in the new table? You can change them to ordinary numbers: NewFieldName:CLng(pkfieldname) - this will change the data type from Autonumber to plain Number.

  5. #5
    worldwidewall is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2012
    Posts
    23
    Yes i need them in there for future reference.

    Are you saying I can change them to ordinary numbers in the query itself? Or do I have to go back to the table design in the backend?

    Thanks

  6. #6
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    No, that statement I gave you is what you put in the Field column in the query.

  7. #7
    worldwidewall is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2012
    Posts
    23
    Thank you, that worked perfectly.

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

Similar Threads

  1. Export Query Result into CSV
    By David Sabot in forum Queries
    Replies: 2
    Last Post: 12-01-2011, 04:43 AM
  2. Export Query Result to Excel
    By chewbears in forum Access
    Replies: 11
    Last Post: 11-28-2011, 08:31 AM
  3. VB ADO Query Result Set
    By Bedsingar in forum Access
    Replies: 5
    Last Post: 09-05-2011, 10:45 AM
  4. Export a simple query result to an excel file
    By wop_nuno in forum Import/Export Data
    Replies: 1
    Last Post: 05-21-2009, 04:18 AM
  5. Result of Count Query not known elsewhere
    By Carole in forum Access
    Replies: 1
    Last Post: 09-07-2008, 09:39 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