Dim problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alain.

    #1

    Dim problem

    Dear group, here is my problem

    In the code of a form, i want to declare a variable :

    Dim Base_Photo as Database, But Access 2000 don't propose
    "Database" and don't accept it.

    But, in an other Base, with Access 2000, this is possible and
    accepted and works !

    I did not find the différence, could you help me ?

    Thank You
    --
    _______________ _______________ ___

    Site photo personnel :




  • Allen Browne

    #2
    Re: Dim problem

    From the code window, choose References on the Tools menu.
    Select the box beside:
    Microsoft DAO 3.6 Library.

    More info:
    How to identify and solve problems with VBA references in a Microsoft Access database. Includes a listing of the libraries needed for each version of Access.


    --
    Allen Browne - Microsoft MVP. Perth, Western Australia.
    Tips for Access users - http://allenbrowne.com/tips.html

    "Alain." <_@wanadoo.fr > wrote in message
    news:bk849d$tk4 $1@news-reader3.wanadoo .fr...[color=blue]
    > Dear group, here is my problem
    >
    > In the code of a form, i want to declare a variable :
    >
    > Dim Base_Photo as Database, But Access 2000 don't propose
    > "Database" and don't accept it.
    >
    > But, in an other Base, with Access 2000, this is possible and
    > accepted and works !
    >
    > I did not find the différence, could you help me ?
    >
    > Thank You
    > --
    > _______________ _______________ ___
    >
    > Site photo personnel :
    >
    > http://perso.wanadoo.fr/dimphoto
    >
    >[/color]


    Comment

    • Marc

      #3
      Re: Dim problem

      "Alain." <_@wanadoo.fr > wrote in message news:<bk849d$tk 4$1@news-reader3.wanadoo .fr>...[color=blue]
      > Dear group, here is my problem
      >
      > In the code of a form, i want to declare a variable :
      >
      > Dim Base_Photo as Database, But Access 2000 don't propose
      > "Database" and don't accept it.
      >
      > But, in an other Base, with Access 2000, this is possible and
      > accepted and works !
      >
      > I did not find the différence, could you help me ?
      >
      > Thank You[/color]

      Alain,

      When you create a new access mdb-file ADO is the default library, not
      DAO like in Access 97. Just add the DAO 3.6 library or replace the ADO
      library for DAO. When you are in the module look in the references
      option in the tools menu. Database is not part of the ADO
      object-model. If you don't want to use ADO don't declare the
      library-reference. Then you are not confused by several ADO oriented
      help-files if you need help.

      Marc

      Comment

      • Alain.

        #4
        It works !

        Thank you to you three. I think the other DB which works was
        converted from Access 97. Thanks again
        --
        _______________ _______________ ___

        Site photo personnel :




        Comment

        Working...