Results 1 to 5 of 5
  1. #1
    aligahk06 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Posts
    94

    Importing table data in excel sheet from forms command


    Dear All,

    I have a form with search command. While using search command it gives the result from table . I want to export the result in excel sheet by using either command or any alternative solution.

    Please assist me how to do this.

    Thanks for your valuable time.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    the query that produces the search result ,ie: qsFindData


    vFile = "C:\mypath\files\SearchResults.xlsx"
    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qsFindData", vFile, True,"Results"

  3. #3
    aligahk06 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Posts
    94

    Importing table data in excel sheet from forms command

    Dear All,


    I tried in my form but it won't help me.

    Please see attached form and i want a command that yield search result in excel sheet.
    Old thread:
    I have a form with search command. While using search command it gives the result from table . I want to export the result in excel sheet by using either command or any alternative solution.

    Please see attached.

    Thanks all for time.
    Attached Files Attached Files

  4. #4
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664

    **EXPORTING** table data To excel sheet from forms command

    I never use a split form, so I was stumped for a while.

    I converted all of the macros to VBA.
    I added a button to export the records to Excel.
    Instead of changing the Form Record source, I would have set the form filter; much easier in my view.

    You need to edit the code for the new button: change the path and the file name to what you want.
    You could add a folder picker to be able to select a path and a text box to change the file name.

    This is very basic... but it seems to create an Excel file for me....
    Attached Files Attached Files

  5. #5
    aligahk06 is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Apr 2010
    Posts
    94
    Dear All,

    Thanks for precious time.
    it solved the problem.

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

Similar Threads

  1. Replies: 1
    Last Post: 08-28-2019, 04:26 AM
  2. Trouble importing Excel sheet - Access doesnt see it.
    By knowshowrosegrows in forum Access
    Replies: 2
    Last Post: 08-31-2015, 12:55 PM
  3. Tons of issues importing excel sheet for leads
    By udfxrookie in forum Import/Export Data
    Replies: 2
    Last Post: 02-07-2015, 08:54 AM
  4. Importing full excel sheet to access
    By karakal in forum Import/Export Data
    Replies: 0
    Last Post: 03-22-2010, 03:48 PM
  5. Importing Excel Sheet into Access dbase
    By tonystowe in forum Import/Export Data
    Replies: 0
    Last Post: 12-08-2006, 11:35 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