Results 1 to 3 of 3

Thread: Data Report - Error

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Malaysia
    Posts
    90
    My report was OK the first time I run it from a menu. However when i closed the report and returned to the menu to rerun it one more time. Error message show up "The operation requested by the application is not allowed if the object is closed"


    Private Sub MnuOne_Click()
    'need to decide the app.path at run time
    'Employee.mdb is in WinNt shared drive
    DeConn.Conn1 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Employee.mdb"

    DeConn.Conn1.Open
    RptActions.Show
    DeConn.Conn1.Close
    End Sub


    What is my mistake on the above coding.

    Best wishes
    CT


    CT

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Location
    Malaysia
    Posts
    90
    Thank you for your advise on this matter.

    Basically i have a data environment setup to connect with my mdb. I have a data report generating information to the screen/printer.

    What I am trying to do is to tell the connection to use the proper path because my users are using shared drive in winnt.

    If i hard code this program such as "E:\ABC\Employee.mdb" using the connection properties, it will works for me.

    Like wise with this hard coding method, I can call the report.show many times without hitting any error message.

    regards
    CT

  3. #3
    Addicted Member
    Join Date
    Jan 2000
    Location
    Sydney, Australia
    Posts
    196
    fair enough - o you know at which line the error message is thrown?


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