Results 1 to 11 of 11

Thread: Saving reports in Access 2000

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2005
    Location
    Poulsbo, WA
    Posts
    60

    Saving reports in Access 2000

    I think this is the right place for this...

    My application in Access 2000 need to be able to out put a report onto the local drive(C:/somethingorother). Is there a way to open up the file explorer to allow users to save the file wherever they want?

    Thanks!
    John

  2. #2

    Thread Starter
    Member
    Join Date
    Jun 2005
    Location
    Poulsbo, WA
    Posts
    60

    Re: Saving reports in Access 2000

    Okay, I found the open file api on Dev Ashish website. How do I change it around so I can open then save the report I have?

    John

  3. #3
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Saving reports in Access 2000

    This code will present them with a dialog box to select the report name and type to export it as. You just need to open the report before hand.

    VB Code:
    1. Application.DoCmd.OpenReport "Report1", acViewPreview, , , acWindowNormal
    2. Application.DoCmd.RunCommand acCmdExport
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  4. #4

    Thread Starter
    Member
    Join Date
    Jun 2005
    Location
    Poulsbo, WA
    Posts
    60

    Re: Saving reports in Access 2000

    So how do I prompt them for a directory to export to? I'm lost here.

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Saving reports in Access 2000

    Did you test it out?

    This line invokes the dialog prompt requesting the location for them to choose.

    VB Code:
    1. Application.DoCmd.OpenReport "Report1", acViewPreview, , , acWindowNormal
    2. 'Prompt and export in one line of code.
    3. Application.DoCmd.RunCommand acCmdExport
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  6. #6
    Lively Member
    Join Date
    Apr 2006
    Posts
    68

    Re: Saving reports in Access 2000

    G'd morning!!! and i'm sorry to butt in...
    But wouldn't be easier to "print" your report in a pdf printer? it will automaticaly ask for the place to save and you won't need expensive api calls. Even better 0 lines of code.
    Good luck
    Estuardo

  7. #7
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Saving reports in Access 2000

    A pdf printer is just as expensive if not more then using the internal Office methods. Plus, the poster want to save the file to the drive too.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  8. #8
    Lively Member
    Join Date
    Apr 2006
    Posts
    68

    Re: Saving reports in Access 2000

    G'd afternoon!!
    I wouldn't call expensive the pdf tool, If you have a elaborated layout, with boxes, lines, overlaped textboxes, graphics, etc. It will always output your report/doc as it is, It let's you save it on the disk.
    The same does not happen with the export command, it will export a "naked" report just label's and textboxes. From there you will need to re-do it by hand.

  9. #9
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Saving reports in Access 2000

    Well its good desing that you wouldnt place anything other then labels or textboxes on your report. Either way, you can use what is best suited for your needs.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  10. #10
    Lively Member
    Join Date
    Apr 2006
    Posts
    68

    Re: Saving reports in Access 2000

    I don't like to quote other people's post, so let me try this way:
    "Well its good desing that you wouldnt place anything other then labels or textboxes on your report"

    Are you serious? or it's just your way to say "Welcome" to new members?

    I don't know what kind of reports you design. I don't know how do you present statistics without graphs, what about logo's? could you please point me any manufacturer's link where they recomend to use nothing but textboxes and labels?

    Please don't get me wrong, i did not came here to get it in arguments, but i think is not nice to just reply without take a good read of other's posts.
    In my first post i said:

    "... it will automaticaly ask for the place to save "

    and in you replied:
    ".... Plus, the poster want to save the file to the drive"

    Then i had try to explain myself better. No luck. It wasn't enough, and again with no valid args you come here to tell the world that is not a good design to use more than labels and textboxes!!!

    Once again: Are you serious?

  11. #11
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Saving reports in Access 2000

    Quote Originally Posted by RobDog888
    Either way, you can use what is best suited for your needs.
    Should say it all.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

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



Click Here to Expand Forum to Full Width