Results 1 to 10 of 10

Thread: how can i print access report

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2005
    Posts
    278

    how can i print access report

    hi all.

    How can i print access report using vb code without opening access database window. i need the vb code to show the access report in the preview mode. please give me the respective code..

    saj

  2. #2
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: how can i print access report

    Never did, but try referencing the Microsoft Access Object Library in your VB project, declare the access object and
    Code:
    objAccess.DoCmd.OpenReport rptName
    Last edited by jggtz; Oct 11th, 2008 at 06:31 PM.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    May 2005
    Posts
    278

    Re: how can i print access report

    Thank u for the reply,,i can able to take print out.

    but my doubt,

    1. Is it possible to print access report without opening the ms access database (client dont want see the access database to be open)

    2. How can i print the system date in the format Month day year ( eg: October 15, 2008) in access report.

    saj

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Access + VB code

    Quote Originally Posted by sajankk
    1. Is it possible to print access report without opening the ms access database (client dont want see the access database to be open) using vb code
    No. In order to do anything with an Access report, the database has to be opened.

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

    Re: Access + VB code

    2. Yes, open your report and add a label to it. Then in the controlsource property format the Date() function as you desire.

    1. You do have to open the Access database and the system does need Access installed. You can do it hidden too so the user doesnt see.
    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
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: how can i print access report

    Duplicate Threads Merged

    One topic, one thread, one section please.

    Thank you.

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    May 2005
    Posts
    278

    Re: Access + VB code

    Quote Originally Posted by RobDog888
    2. Yes, open your report and add a label to it. Then in the controlsource property format the Date() function as you desire.

    1. You do have to open the Access database and the system does need Access installed. You can do it hidden too so the user doesnt see.

    thank u rob...

    how can i hide and open database through vb code. can u explain please

    saj

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    May 2005
    Posts
    278

    Re: how can i print access report

    can anybody will help me in this matter. otherwise i have to go for crystal report.

  9. #9
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: how can i print access report

    Access Object
    Last edited by jggtz; Oct 19th, 2008 at 12:45 PM.

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    May 2005
    Posts
    278

    Re: how can i print access report

    Quote Originally Posted by jggtz
    Access Object
    what u mean by access object

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