Results 1 to 4 of 4

Thread: How do you close this code : Set db = OpenDatabase(App.Path & "\MonitorMe.mdb", True,

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2002
    Posts
    131

    How do you close this code : Set db = OpenDatabase(App.Path & "\MonitorMe.mdb", True,

    Thank you for your time. I get a

    Run time error: '70'
    Permission Denied

    when I try to save the whole database at run time. Can anyone help me close these:

    vb codes:

    Private Sub Load_()

    datC.DatabaseName = (App.Path & "\MonitorMe.mdb")

    End sub

    ' and/or this one...

    Public Sub '--- This is in a module (mod.bas)

    Set db = OpenDatabase(App.Path & "\MonitorMe.mdb", True, False, "MS ACCESS;PWD=" & YourPassWord)

    End sub



    God bless,
    Alvin
    Philippines

  2. #2
    New Member
    Join Date
    Feb 2003
    Location
    Delhi-India
    Posts
    10
    please clarify your problem.

  3. #3
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ...

    Make sure the MDB is not open in Access, i.e. you have not opened it by double-clicking on it.

    Then make sure it's not read-only. Or it's being used by another application.

    Finally make sure you have the database cleanup code in place, i.e. closing the Database connection at the end of your app and so on.

    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Mar 2002
    Posts
    131
    Thanks for the reply. The database is not runnned by Access or any application and is not read only but can be edit. Can you give a possible code to close them (the one with the databasename line and the one with the Set db = )


    God bless,
    Alvin

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