Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Cornwall, England
    Posts
    393
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Export to Excel (access97)

    Stupid question but i cant find the answer anywhere.

    how to i code a button to export the whole recordset of a form to an excel spreadsheet?
    Am i wrong thinking its the DoCmd.DoMenuItem ?

    many thanks , if you can help me.

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Export to Excel (access97)

    Hi,
    Try something like:
    DoCmd.OutputTo acOutputForm, , acFormatXLS, "C:form.xls", True
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Cornwall, England
    Posts
    393
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Export to Excel (access97)

    Perfect, thank you very much. <img src=/S/ribbon.gif border=0 alt=ribbon width=15 height=15> <img src=/S/bow.gif border=0 alt=bow width=15 height=15>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •