Results 1 to 3 of 3

Thread: Opening MS Access Reports from Visual Basic

  1. #1

    Thread Starter
    Addicted Member rpk_20061975's Avatar
    Join Date
    Jun 2001
    Location
    India
    Posts
    234

    Opening MS Access Reports from Visual Basic

    I am using following code to view preview of a report built in MS Access, but it just displays an hourglass pointer and nothing happens. What's the problem?
    Code:
    Dim appAccess As Access.Application
            
            Set appAccess = New Access.Application
    
            appAccess.OpenCurrentDatabase App.Path & "\data\eticketxp.mdb", True, "Devel0peR"
    
            'appAccess.DoCmd.OpenReport "TestReport", acPreview, , "myOptionalCondition"
            appAccess.DoCmd.OpenReport "TestReport", acPreview, , "myOptionalCondition"
            'appAccess.DoCmd.OpenForm "Addresses", acPreview
            
            appAccess.Quit
    
            Set appAccess = Nothing

  2. #2
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950
    Are you spelling "Developer" correctly? It looks like a zero where the letter O should go.
    Tengo mas preguntas que contestas

  3. #3

    Thread Starter
    Addicted Member rpk_20061975's Avatar
    Join Date
    Jun 2001
    Location
    India
    Posts
    234
    Exactly....It is 0 and it is deliberately inserted there.

    I even used

    appAccess.Visible

    but it opened the main MS Access window with my database opened along with the Report. I just want to display preview.

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