Results 1 to 8 of 8
  1. #1
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389

    Data export coding


    Hii all experts,

    I want to create a data export button on the form, on which when the user clicks, he can directly export the data set in a query to Excel and open the Excel file on the form. What code can I get for this?

  2. #2
    xps35's Avatar
    xps35 is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Jun 2022
    Location
    Schiedam, NL
    Posts
    233
    Use DoCmd.TransferSpreadsheet
    Groeten,

    Peter

  3. #3
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    in this code where i use the name of report...?
    Last edited by deepaksharma; 09-09-2023 at 04:23 AM.

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,980
    Are you incapable of Googling for at least some information?
    Microsoft have gone to a lot of trouble to document their products. At least give them a look from time to time.

    https://learn.microsoft.com/en-us/of...ferspreadsheet
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    deepaksharma is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Jul 2023
    Location
    india
    Posts
    389
    Quote Originally Posted by Welshgasman View Post
    Are you incapable of Googling for at least some information?
    Microsoft have gone to a lot of trouble to document their products. At least give them a look from time to time.

    https://learn.microsoft.com/en-us/of...ferspreadsheet
    I have come here after working hard not only on Google but also on YouTube.

  6. #6
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,980
    So you have been given a command to use, but cannot find it on google.?

    A simple expression "export access query to excel vba" would give you many links with examples.
    I am not being cruel here, just trying to get you to learn things for yourself.
    https://www.google.com/search?q=expo...e-gws-wiz-serp
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  7. #7
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,568
    Hi

    You can use the following guide to setup a Command Button to run the Export.
    Attached Files Attached Files
    You can PM me if you need further help.
    Good Reading https://docs.microsoft.com/en-gb/off...on-description

  8. #8
    orange's Avatar
    orange is offline Moderator
    Windows 10 Office 365
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,730

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

Similar Threads

  1. Replies: 26
    Last Post: 04-07-2020, 02:29 AM
  2. VBA coding to filter data
    By qwerty in forum Access
    Replies: 4
    Last Post: 11-07-2018, 06:56 PM
  3. Coding to export data from single record to Word Bookmarks
    By Fatmonkeymedia in forum Programming
    Replies: 5
    Last Post: 12-01-2016, 10:39 PM
  4. Appending data using coding..!!
    By desiretolearn in forum Programming
    Replies: 3
    Last Post: 06-09-2014, 10:31 AM
  5. parsing data in access (coding?)
    By banker247 in forum Programming
    Replies: 0
    Last Post: 01-13-2009, 12:05 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