DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 8 of 8

Thread: Place a MS Access report on a VB6 form

  1. #1
    Keith Guest

    Place a MS Access report on a VB6 form


    I hope this is the right place for this question...

    I'm writing a simple app that uses a MS Access database to hold data, queries
    and reports. I want to be able to open a Report and show it as a VB form.
    I don't want to use the VB report functions because I want to be able to
    update reports without recompiling my app...

    If anyone knows how to do this or has any suggestions please let me know.

    By the way, I'm running on quite a tight schedule, so please respond asap.

    thanx in advance

    Keith Mac Lure
    <><


  2. #2
    Tony A Guest

    Re: Place a MS Access report on a VB6 form


    Keith:

    I don't do any professional programming but in a similar instance I have
    used a DataGrid control on a form for this purpose. It is connected to the
    Access db using an Adodc (ADO data control).

    Hope that gets you started,
    Tony


    "Keith" <jumprightin@c4.com> wrote:
    >
    >I hope this is the right place for this question...
    >
    >I'm writing a simple app that uses a MS Access database to hold data, queries
    >and reports. I want to be able to open a Report and show it as a VB form.
    >I don't want to use the VB report functions because I want to be able to
    >update reports without recompiling my app...
    >
    >If anyone knows how to do this or has any suggestions please let me know.
    >
    >By the way, I'm running on quite a tight schedule, so please respond asap.
    >
    >thanx in advance
    >
    >Keith Mac Lure
    ><><
    >



  3. #3
    jo Guest

    Re: Place a MS Access report on a VB6 form


    Have you thought about using crystal reports?
    "Tony A" <tony_abruzzo@hotmail.com> wrote:
    >
    >Keith:
    >
    >I don't do any professional programming but in a similar instance I have
    >used a DataGrid control on a form for this purpose. It is connected to the
    >Access db using an Adodc (ADO data control).
    >
    >Hope that gets you started,
    >Tony
    >
    >
    >"Keith" <jumprightin@c4.com> wrote:
    >>
    >>I hope this is the right place for this question...
    >>
    >>I'm writing a simple app that uses a MS Access database to hold data, queries
    >>and reports. I want to be able to open a Report and show it as a VB form.
    >>I don't want to use the VB report functions because I want to be able to
    >>update reports without recompiling my app...
    >>
    >>If anyone knows how to do this or has any suggestions please let me know.
    >>
    >>By the way, I'm running on quite a tight schedule, so please respond asap.
    >>
    >>thanx in advance
    >>
    >>Keith Mac Lure
    >><><
    >>

    >



  4. #4
    Richard Watt Guest

    Re: Place a MS Access report on a VB6 form



    ComponentOne sell a report control call VSReports that lets you convert Access
    reports into one that you can run from VB. I have not used it so couldn't
    say how well it works, but you shold be able to download a demo and gve it
    a try.

    http://home.component1.com/cmd.boa?product=VSRPRT

    Cheers
    Richard

    "jo" <yfreedman@yahoo.com> wrote:
    >
    >Have you thought about using crystal reports?
    >"Tony A" <tony_abruzzo@hotmail.com> wrote:
    >>
    >>Keith:
    >>
    >>I don't do any professional programming but in a similar instance I have
    >>used a DataGrid control on a form for this purpose. It is connected to

    the
    >>Access db using an Adodc (ADO data control).
    >>
    >>Hope that gets you started,
    >>Tony
    >>
    >>
    >>"Keith" <jumprightin@c4.com> wrote:
    >>>
    >>>I hope this is the right place for this question...
    >>>
    >>>I'm writing a simple app that uses a MS Access database to hold data,

    queries
    >>>and reports. I want to be able to open a Report and show it as a VB form.
    >>>I don't want to use the VB report functions because I want to be able

    to
    >>>update reports without recompiling my app...
    >>>
    >>>If anyone knows how to do this or has any suggestions please let me know.
    >>>
    >>>By the way, I'm running on quite a tight schedule, so please respond asap.
    >>>
    >>>thanx in advance
    >>>
    >>>Keith Mac Lure
    >>><><
    >>>

    >>

    >



  5. #5
    Keith Guest

    Re: Place a MS Access report on a VB6 form


    I don't want to use crystal because if I make significant changes to the report
    then I have to recompile & redistribute the app.

    If I use a Access report that is already part of the .mdb, I can update the
    distributed .mdb very easily and that way I can update any queries and tables
    that might change at the same time...

    I specifically just want to insert the report pretty much the same way you'd
    insert a chart or spreadsheet on to a form...



    "jo" <yfreedman@yahoo.com> wrote:
    >
    >Have you thought about using crystal reports?
    >"Tony A" <tony_abruzzo@hotmail.com> wrote:
    >>
    >>Keith:
    >>
    >>I don't do any professional programming but in a similar instance I have
    >>used a DataGrid control on a form for this purpose. It is connected to

    the
    >>Access db using an Adodc (ADO data control).
    >>
    >>Hope that gets you started,
    >>Tony
    >>
    >>
    >>"Keith" <jumprightin@c4.com> wrote:
    >>>
    >>>I hope this is the right place for this question...
    >>>
    >>>I'm writing a simple app that uses a MS Access database to hold data,

    queries
    >>>and reports. I want to be able to open a Report and show it as a VB form.
    >>>I don't want to use the VB report functions because I want to be able

    to
    >>>update reports without recompiling my app...
    >>>
    >>>If anyone knows how to do this or has any suggestions please let me know.
    >>>
    >>>By the way, I'm running on quite a tight schedule, so please respond asap.
    >>>
    >>>thanx in advance
    >>>
    >>>Keith Mac Lure
    >>><><
    >>>

    >>

    >



  6. #6
    Keith Guest

    Re: Place a MS Access report on a VB6 form


    Thanks Richard

    I would prefer not to use 3rd party controls, but I'll give it a try...

    I'll post any findings here...

    Regards
    Keith


    "Richard Watt" <rich_watt@hotmail.com> wrote:
    >
    >
    >ComponentOne sell a report control call VSReports that lets you convert

    Access
    >reports into one that you can run from VB. I have not used it so couldn't
    >say how well it works, but you shold be able to download a demo and gve

    it
    >a try.
    >
    >http://home.component1.com/cmd.boa?product=VSRPRT
    >
    >Cheers
    >Richard
    >
    >"jo" <yfreedman@yahoo.com> wrote:
    >>
    >>Have you thought about using crystal reports?
    >>"Tony A" <tony_abruzzo@hotmail.com> wrote:
    >>>
    >>>Keith:
    >>>
    >>>I don't do any professional programming but in a similar instance I have
    >>>used a DataGrid control on a form for this purpose. It is connected to

    >the
    >>>Access db using an Adodc (ADO data control).
    >>>
    >>>Hope that gets you started,
    >>>Tony
    >>>
    >>>
    >>>"Keith" <jumprightin@c4.com> wrote:
    >>>>
    >>>>I hope this is the right place for this question...
    >>>>
    >>>>I'm writing a simple app that uses a MS Access database to hold data,

    >queries
    >>>>and reports. I want to be able to open a Report and show it as a VB form.
    >>>>I don't want to use the VB report functions because I want to be able

    >to
    >>>>update reports without recompiling my app...
    >>>>
    >>>>If anyone knows how to do this or has any suggestions please let me know.
    >>>>
    >>>>By the way, I'm running on quite a tight schedule, so please respond

    asap.
    >>>>
    >>>>thanx in advance
    >>>>
    >>>>Keith Mac Lure
    >>>><><
    >>>>
    >>>

    >>

    >



  7. #7
    Russ Guest

    Re: Place a MS Access report on a VB6 form


    "Keith" <jumprightin@c4.com> wrote:
    >
    >I don't want to use crystal because if I make significant changes to the

    report
    >then I have to recompile & redistribute the app.
    >
    >If I use a Access report that is already part of the .mdb, I can update

    the
    >distributed .mdb very easily and that way I can update any queries and tables
    >that might change at the same time...
    >
    >I specifically just want to insert the report pretty much the same way you'd
    >insert a chart or spreadsheet on to a form...
    >


    Keith,
    I don't know if this will help as it does not place the report on a VB form,
    but you can use VB to show the Access report within Access. You need a reference
    to Microsoft Access 8.x Object Library.


    Option Explicit
    Dim mAcc As Access.Application

    Private Sub Command1_Click()
    mAcc.DoCmd.OpenReport "My Report", acViewPreview
    mAcc.Visible = True
    End Sub

    Private Sub Form_Load()
    Set mAcc = New Access.Application
    mAcc.OpenCurrentDatabase "C:\MyPath\MyDB.mdb"
    End Sub

    Private Sub Form_Unload(Cancel As Integer)
    mAcc.CloseCurrentDatabase
    Set mAcc = Nothing
    End Sub

    Just an idea,
    -Russ.

  8. #8
    Keith Guest

    Re: Place a MS Access report on a VB6 form


    Thanks Russ

    It's a pity Microsoft didn't think about this kind of thing.

    Thanks for the Idea, I'll play around with it.

    Cheers

    Keith

    "Russ" <russell.thompson@adlink.com> wrote:
    >
    >"Keith" <jumprightin@c4.com> wrote:
    >>
    >>I don't want to use crystal because if I make significant changes to the

    >report
    >>then I have to recompile & redistribute the app.
    >>
    >>If I use a Access report that is already part of the .mdb, I can update

    >the
    >>distributed .mdb very easily and that way I can update any queries and

    tables
    >>that might change at the same time...
    >>
    >>I specifically just want to insert the report pretty much the same way

    you'd
    >>insert a chart or spreadsheet on to a form...
    >>

    >
    >Keith,
    >I don't know if this will help as it does not place the report on a VB form,
    >but you can use VB to show the Access report within Access. You need a

    reference
    >to Microsoft Access 8.x Object Library.
    >
    >
    >Option Explicit
    >Dim mAcc As Access.Application
    >
    >Private Sub Command1_Click()
    > mAcc.DoCmd.OpenReport "My Report", acViewPreview
    > mAcc.Visible = True
    >End Sub
    >
    >Private Sub Form_Load()
    > Set mAcc = New Access.Application
    > mAcc.OpenCurrentDatabase "C:\MyPath\MyDB.mdb"
    >End Sub
    >
    >Private Sub Form_Unload(Cancel As Integer)
    > mAcc.CloseCurrentDatabase
    > Set mAcc = Nothing
    >End Sub
    >
    >Just an idea,
    >-Russ.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center