Results 1 to 9 of 9

Thread: how can i connect access report

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2005
    Posts
    278

    how can i connect access report

    hi all,

    i made a report in access first time. how can i connect this report through VB code

    thanx in advance

    saj

  2. #2
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Smile Re: how can i connect access report

    Quote Originally Posted by sajankk
    hi all,

    i made a report in access first time. how can i connect this report through VB code

    thanx in advance

    saj
    Check This Code for using the access report at post 2

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    May 2005
    Posts
    278

    Re: how can i connect access report

    thank you for the reply,

    unfortunately that link is not working

    i have smaall code sample. after executing this code one window is blinking and leaving. acutaly iwant to print that.
    here is vb code am trying,

    VB Code:
    1. Dim aAPP as access.application
    2. Set aAPP=New Access.Applicaiton
    3. aApp.visible =true
    4. aApp.OpencurrentDatabase "D:\Slip.mdb"
    5. aApp.DoCmd.OpenReport "report", acViewPreview

    please help me it is quite urgent

    saj
    Last edited by sajankk; Sep 30th, 2006 at 05:08 AM.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    May 2005
    Posts
    278

    Re: how can i connect access report

    can anybody help in this regard pls


    saj

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

    Re: how can i connect access report

    Change acViewPreview to acViewNormal as the default normal view for a report is to print it.
    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

    Thread Starter
    Hyperactive Member
    Join Date
    May 2005
    Posts
    278

    Re: how can i connect access report

    thank u for the reply

    now i can able to print ... but it is printing what all the data in the report... how can i print on criteria base. that is if i want to print with regno=1101 then what should be the code for that....

    thanx

    saj

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    May 2005
    Posts
    278

    Re: how can i connect access report

    i would like to explain what i did so far to get the help. I made a query in the access that contains most of the fileds from two tables. and in the designing time of the report , i select that query and insert the fields and formatted.

    from vb i want to call this report and print those records which i need to print that point of time.

    eg: i want to print the student details with regno... i hv a combo in VB form. When i select from the combo it shoul print that partiuclar students details only

    i hv to submit this as my project. tomorrow is the last date. any help can be appreciated. printing ?

    saj

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    May 2005
    Posts
    278

    Re: how can i connect access report

    any suggestion... please


    saj

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

    Re: how can i connect access report

    You can pass a where clause for when you open your report.
    VB Code:
    1. Application.DoCmd.OpenReport "Report1", acViewPreview, , "Field1 = 'Something'", acWindowNormal
    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