Results 1 to 4 of 4

Thread: Need Help with Report.

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Mobile, AL, USA
    Posts
    600

    Question Need Help with Access Report.

    Hi.

    I'm trying to display an Access Report from VB. Here are my issues/questions.
    • The report has a Password, but the code that I am using to supply the password to the report isn't working.
    • When Access opens up, I want it to be maximized. Currently, it isn't.
    • Will I have any problems installing this app on a machine that doesn't have Access? Of course, I'll use the P&D Wizard to make sure that all of the necessary DLL's are included.
    Here's the code.
    Code:
    Private Sub cmdInvoice_Click()
        'This report Displays the Sales Invoice,
        'which is a MS Access Report.
    
        Dim aReport As Access.Application
    
        On Error GoTo ErrorRoutine
    
        Set aReport = New Access.Application
    
        aReport.DBEngine.DefaultUser = "Admin"
        aReport.DBEngine.DefaultPassword = "openmydb"
    
        aReport.OpenCurrentDatabase "C:\WINDOWS\Desktop\Current Projects\Book Store Project\BookStoreDB.mdb"
        aReport.Visible = True
        aReport.DoCmd.OpenReport "Invoice", acViewPreview
        aReport.DoCmd.Maximize
    
        Exit Sub
    ErrorRoutine:
        DisplayError "Counter Sales Form: cmdInvoice_click"
    End Sub
    Thanks, in advance, for any guidance.

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Didn't you post this one already?

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Mobile, AL, USA
    Posts
    600

    Yes I did...

    but I still haven't got a suitable solution.

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Mobile, AL, USA
    Posts
    600

    Unresolved!!!!

    I'm still hopeful that someone knows how to do this. But I'm slowly losing faith.

    Thanks.

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