Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Sep 2001
    Location
    Stuck at work..., Missouri, USA
    Posts
    248
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Compile Error -> CurrentDB (97)

    I have an Access97 databse with this code in it: <pre>Dim myDB as Database
    Set myDB = CurrentDb</pre>



    The application is only used once a month or so and just started throwing this error:
    <pre>Compile Error:

    Function or interface marked as restricted, or the function uses an Automation type
    not supported in Visual Basic.
    </pre>


    Any ideas?
    <font face="Comic Sans MS">Morgan Erickson</font face=comic>
    morgan.erickson@sprint.com
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18>-From <img src=/S/flags/Colorado.gif border=0 alt=Colorado width=30 height=18> but living in <img src=/S/flags/Missouri.gif border=0 alt=Missouri width=30 height=18>...and working in Kansas.

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Compile Error -> CurrentDB (97)

    A couple of things to check - is the database split into a front-end and a back-end, and do you perhaps have a later version of DAO than that which shipped with Access97. The latter should be DAO 3.5, not DAO 3.6 if you are running Access97 on both the back-end and the front-end. You may want to look at a module and then check the references to see what has been set.
    Wendell

  3. #3
    3 Star Lounger
    Join Date
    Sep 2001
    Location
    Stuck at work..., Missouri, USA
    Posts
    248
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Compile Error -> CurrentDB (97)

    It is not split. I checked the DAO and it has 3.6 checked. There were no other versions available in the box. Odd.

    A co-worker of hers has a copy of the Database and got it to work so there is no problem anymore.

    Thanks for the help.
    <font face="Comic Sans MS">Morgan Erickson</font face=comic>
    morgan.erickson@sprint.com
    <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18>-From <img src=/S/flags/Colorado.gif border=0 alt=Colorado width=30 height=18> but living in <img src=/S/flags/Missouri.gif border=0 alt=Missouri width=30 height=18>...and working in Kansas.

  4. #4
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Compile Error -> CurrentDB (97)

    You might try this in future:

    Dim myDB as DAO.Database
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  5. #5
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Compile Error -> CurrentDB (97)

    Francois

Posting Permissions

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