Results 1 to 2 of 2
  1. #1
    BED is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2010
    Posts
    26

    Exporting to Excel Date Stamped File

    I have a form in which a user can export any number from 1-8 tables to a excel workbook. I have it fully functional but i need help including a date stamp on the file.



    Ex.
    Today export table 1 and 2 to filename Example_TodaysYearTodaysMonthTodaysDate.xls

    Tomorrow
    Export table 3 and 4 to filename
    Example_TodaysYearTodaysMonthTodaysDate.xls

    It has to create the document every time.

    Any thoughts

    i have this in the filename portion and it doesnt work

    Example_& DatePart("YYYY",Date()) & " " & DatePart("M",Date()) & " " & DatePart("d",Date()) .xls

  2. #2
    pkstormy's Avatar
    pkstormy is offline Access/SQL Server Expert
    Windows XP Access 2003
    Join Date
    Mar 2010
    Location
    Madison
    Posts
    682
    I would create a variable and then populate that variable with your datepart equation. You can do a msgbox MyVariable to see what it looks like after you populate it in code. If it looks ok, then use that variable as the parameter part for you filename (versus trying to export AND do a DatePart in the same line of code.)

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

Similar Threads

  1. Exporting to Excel
    By DreamOn in forum Import/Export Data
    Replies: 1
    Last Post: 05-23-2010, 10:27 PM
  2. Exporting to Excel Problem
    By octu in forum Import/Export Data
    Replies: 1
    Last Post: 04-14-2010, 11:28 PM
  3. Really Need Help With Exporting to Excel
    By graviz in forum Import/Export Data
    Replies: 0
    Last Post: 09-24-2009, 08:29 AM
  4. Exporting a Report to Excel
    By bullwinkle55423 in forum Reports
    Replies: 0
    Last Post: 12-11-2007, 10:27 AM
  5. Exporting a chart to Excel?
    By hraup in forum Access
    Replies: 0
    Last Post: 08-31-2006, 12:21 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