Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2003
    Location
    chennai
    Posts
    27

    Unanswered: Urgent:is it possible to access Ms-access reports in VB6.0

    hello friends

    i need help from u ,i generated reports in ms-access and i want to access reports through vb,ie..,i want to connect vb with ms-access reports

    its very very urgent

  2. #2
    Join Date
    Oct 2002
    Location
    Argentina
    Posts
    72

    Re: Urgent:is it possible to access Ms-access reports in VB6.0

    You must reference Microsoft Access Object Library on your vb project

    So then you can have

    a line like this

    Dim a As New Access.Report



    ..
    ..
    ..
    ..
    ..



    Originally posted by sendtovasu
    hello friends

    i need help from u ,i generated reports in ms-access and i want to access reports through vb,ie..,i want to connect vb with ms-access reports

    its very very urgent

  3. #3
    Join Date
    Dec 2003
    Location
    chennai
    Posts
    27

    Re: Urgent:is it possible to access Ms-access reports in VB6.0

    hello

    ok i'll try meanwhile how should i connect the database and access report

    please give me sample coding

    thanks for ur reply



    Originally posted by fhunth
    You must reference Microsoft Access Object Library on your vb project

    So then you can have

    a line like this

    Dim a As New Access.Report



    ..
    ..
    ..
    ..
    ..

  4. #4
    Join Date
    Jan 2003
    Location
    New York
    Posts
    160
    Dim aa As Access.Application
    Dim db As String
    db = App.Path & "\access.mdb"
    Set aa = CreateObject(db)
    aa.DoCmd.OpenReport ReportName:="ReportName", View:=0
    DoEvents
    Set aa = Nothing
    Beyond Limitation

  5. #5
    Join Date
    Dec 2003
    Location
    chennai
    Posts
    27
    hai

    i tried that it works fine but what's the probelom u know whenever i executed that set of statements its not showing the view but it automatically prints the page what the report has

    please give me the solution for that


    Originally posted by vextout
    Dim aa As Access.Application
    Dim db As String
    db = App.Path & "\access.mdb"
    Set aa = CreateObject(db)
    aa.DoCmd.OpenReport ReportName:="ReportName", View:=0
    DoEvents
    Set aa = Nothing

  6. #6
    Join Date
    Jan 2003
    Location
    New York
    Posts
    160
    change view:=0
    to
    view:=2

    i have a problem with my access install so i couldn't test it but that should work- you might have to set the result to an object like a label or textbox to be viewed - not 100% sure

    0 allows you to print
    1 - i don't recall, gotta check the book that is currently unavailable to me.
    Beyond Limitation

Posting Permissions

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