Results 1 to 4 of 4
  1. #1
    AccessDummy77 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    2

    Exporting to Excel from Form

    Sorry this is probably really easy but I'm pulling a blank



    In the spirit of the World Cup, I'll explain the form I created.

    In a drop down list I have Ronaldo, Messi and RVP.

    When I click RVP I have Text Boxes that show his information like

    Club Team - Manchester United
    International Team - Netherlands

    etc.

    How can I export the text boxes that describe the player into excel. I know how to export the back end table/query it pulls the data from for all players but don't know how to do it on an individual level.

    Thanks in advance!

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    Take the query you are using to get the data then a button to export the data:

    Code:
    vFile = "c:\myfolder\worldcup.xls"
     DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qsMyQry", vFile, True

  3. #3
    AccessDummy77 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    2
    If I do that, will it export everything from the query? In that example I would only want to export out RVP's information that is showing and not the rest of the query (like Messi's, Ronaldo's, etc)

    Quote Originally Posted by ranman256 View Post
    Take the query you are using to get the data then a button to export the data:

    Code:
    vFile = "c:\myfolder\worldcup.xls"
     DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "qsMyQry", vFile, True

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,644
    It will export all records returned by the query. Need to apply filter in query.

    Or open a filtered report and export the report.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 2
    Last Post: 06-05-2014, 08:29 AM
  2. Replies: 11
    Last Post: 05-09-2014, 11:27 AM
  3. Exporting data to excel form
    By Ben M in forum Access
    Replies: 1
    Last Post: 09-18-2012, 10:59 AM
  4. Exporting Records from a Form to Excel
    By HarryScofs in forum Access
    Replies: 7
    Last Post: 07-27-2011, 10:41 AM
  5. Exporting form to Excel
    By china1383 in forum Forms
    Replies: 0
    Last Post: 01-15-2011, 11:45 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