Results 1 to 6 of 6
  1. #1
    rameshmeena is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2013
    Location
    Riyadh
    Posts
    16

    copy Table

    Sir,

    I am a beginner, I need to export data from my table to another database

    I am using the following command

    sFile = CurrentProject.Path & "" & Format(Date, "dd-mm-yyyy") & ".accdb"



    DoCmd.CopyObject sFile, "employees slected data", acTable, " employees data"

    I dont want to copy all datas from Employees data. I need only selected data, means, those employees whose basic more than USD 250

    how can i create it on the above Docmd

    Pleas help

  2. #2
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Write a query which gets the data you want.

    Then change actable to acquery

    And the name "employees data" to your queryname.


    Sent from my iPhone using Tapatalk

  3. #3
    rameshmeena is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2013
    Location
    Riyadh
    Posts
    16
    thank you for your immediate response.

    I tried this option,
    The output file which i am generating will be stored as an access file name " dd-mm-yyyy : ( 26-03-2017.accdb) contains the table : Employee selected data "
    dont have any records.

    I need to output file table contain the selected data for the employees basic more than USD 250
    Purpose of this table is to import to another data base.

  4. #4
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    One option is to change your select query into a maketable query. Then export that data using the code you have


    Sent from my iPhone using Tapatalk

  5. #5
    rameshmeena is offline Novice
    Windows XP Access 2007
    Join Date
    Jan 2013
    Location
    Riyadh
    Posts
    16
    Dear can you please tell me what is marketable query,m i didnt understand it clearly

  6. #6
    andy49's Avatar
    andy49 is offline VIP
    Windows 10 Access 2007
    Join Date
    Nov 2016
    Location
    London
    Posts
    1,051
    Certainly.

    When you open the query I mentioned in #2 in design view, you'll see the word "make-table" at the top. Click on this and then run.





    Sent from my iPhone using Tapatalk

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

Similar Threads

  1. Query which copy table
    By Ardoos in forum Queries
    Replies: 1
    Last Post: 01-10-2015, 02:23 PM
  2. Replies: 1
    Last Post: 09-03-2014, 10:48 AM
  3. copy a table into the BE database
    By crowegreg in forum Database Design
    Replies: 8
    Last Post: 09-09-2013, 04:01 PM
  4. Copy Table
    By forestgump in forum Programming
    Replies: 1
    Last Post: 05-16-2011, 07:41 AM
  5. Replies: 2
    Last Post: 04-02-2010, 07:42 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