Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2003
    Posts
    4

    Unanswered: "Set dbs = CurrentDb" fails under XP

    why doesnt "set dbs = currentDB" compile or work under windows XP

    The database has worked succesfully for Win 95, 98 and NT 4.0 for the past four years however XP refuses to compile.

    Regards

    steve

  2. #2
    Join Date
    Sep 2003
    Posts
    4
    PS. I used Office 97 Developer to write it and using Access runtime or Office Pro installations on the XP machine itself.

  3. #3
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    Steve,

    Have you checked all of your reference libraries?
    I'm not sure which one CurrentDb falls under, but
    I would guess it's Microsoft DAO 3.6 Object Library or
    Microsoft Access x.0 Object Library

    Mark
    Inspiration Through Fermentation

  4. #4
    Join Date
    Sep 2003
    Posts
    4
    When I compile under Access 97 on the XP machine it displays the error:

    "Function or interface marked as restricted, or the function uses an automation type not supported in Visual Basic"

    I am using References

    * Visual Basic for Applications
    * Microsoft Access 8.0 Object Libary
    * Microsoft Remote Data Object 2.0
    *Microsoft DAO 2.5/3.5 Combatability libary (also tried "Microsoft DAO 3.6 Object Libary)

    I have tried re-installing MS Access to ensure there are no corrupt files. (or Libaries)

    I have read a few other posts on here and they suggest substituting CurrentDb with dbengine(0)(0). However as the next database I have to test is a large multi-user Production critical database I am more inclined to get the CurrentDb method to work. As dbengine(0)(0) method has been identified as not suitable for multi user environments.

    Any more clues?

  5. #5
    Join Date
    Dec 2002
    Location
    Glasgow, UK
    Posts
    100
    have you tried this:

    dim dbs as DAO.database

    ??
    Access XP & WinXP Pro

  6. #6
    Join Date
    Sep 2003
    Posts
    4
    Just tried the line "dim dbs as DAO.Database" with both 2.5 and 3.6 DAO References but to no success!

    Grrrr!

Posting Permissions

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