Results 1 to 3 of 3
  1. #1
    tggsun is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    11

    Exclamation search records and export

    Hello,
    I have a project need to create a user interfact. The function of the interface, 1). allow end user enter a search range (date informat), 2). create a button which will do search and export the search result into a excel / CSV format file into a folder, 3). the exported file's name will be automatic set as exported date.


    Do you think this one can be done without VBA? if yes, how to do that?
    Thanks,
    DD SF

  2. #2
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    I have to admit defeat, I cannot find a way to do it without VBA. Have you searched the internet?

    Here is how to do it using vba:
    - create query, use [Enter Date] parameter - you could also put the date on the form as a text box then the query can refer to it instead (do you know how to do this?)
    - on form, put a command button "Export" or whatever
    - go to the properties for that button - in the OnClick event, select EventProcedure
    - this is the vba to use

    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "query_name", "path and file name" & Format(Date, "yyyymmdd") & ".xls", True

    (This is for Excel 2003)

    Don't copy and paste this - begin typing in VBA and Access will tell you what it wants each step of the way (every time you enter ",") and you will have a better understanding of what you are doing.

  3. #3
    tggsun is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    11
    Thank you.
    I'll try VBA.
    DD SF

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

Similar Threads

  1. How do I Export only new records to CSV
    By shabbaranks in forum Import/Export Data
    Replies: 1
    Last Post: 01-03-2012, 11:35 AM
  2. Export multiple records based on a field
    By dskulman in forum Import/Export Data
    Replies: 0
    Last Post: 03-03-2011, 02:44 PM
  3. export multiple reports based on table records
    By steve2000 in forum Reports
    Replies: 3
    Last Post: 10-03-2010, 03:44 PM
  4. Search 17,000 records
    By dibblejon in forum Forms
    Replies: 1
    Last Post: 02-25-2010, 08:01 AM
  5. Export single records to new Word Document
    By karmaimages in forum Import/Export Data
    Replies: 0
    Last Post: 11-19-2009, 03:37 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