???? ID: 824255 - ????? ???????: 17 ??????? 2011 - ??????: 3.0

?? ???? ????? ???? Visual Basic ????????? ?????? ?? ???

?????? ??????This article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
?? ???? ?? Microsoft Access ??????? (.mdb) ?? ???? ???? ?? ?? ???? ?? ??? ???? Microsoft Access project (.adp)?

?????: ?????? ???????? ??????, ?????????????? ?? multiuser ???? ???

?? ????? ??

??? ?? ??????? ???? | ??? ?? ??????? ????

??????

?? ???? ?? Microsoft Office Access 2007, Microsoft Office Access 2003, Microsoft Access 2002, ????? 2000, ?? Access 97 ?? ??? ????????? (VBA) Microsoft Visual Basic ??? ?????? ?? ?? ???? ?? ??? ???? ?? ?? ??????? ?? ???? ?? ????? ???? ???

???? ???????

???????????? ???, ????, ?? ????? ?? ????????? ?? ??????? ???? ?? ??? ????? ????? ??? ???? ???????, ??? ?? ????????? ?? ??? ??? ?? ??????? ???? ??? ?? ????? ???????? ??????? ?? ???? ???.. ?????, ????????? ???? ?? ?? ?? ????? ?? ??????????? ???? ???? ???.. ?????? ??????? ?? ???, ????????? ?? ??????? ???? ?? ???? ???? ??? ?? ???.. ???, ??? ??? ?????? ??????? ???? ?? ?? ?? ????????? ?? ???????????? ?? ???? ???.. ????????? ?? ??? ?? ???? ?? ???????????? ???? ?? ????? ?? ???? ??? ???? ??????? ?? ???, Microsoft ?????? ??? ??? ???? ????? ?? ??? ????? ???? ?????? ????? ????::
322756  (http://support.microsoft.com/kb/322756/ ) ??? ?? ???? ?? Windows ??? ????????? ?? ???????????? ???? ????


??? ?????? ?? ???, ?? Visual Basic ?????? ?? ????? ?? ??????? ??? ????? VBA ?????? ??? ???? ???? ??? ???? ?? ???, ????? ????? ?? ???? ????::
  1. Access ?? ??????? ????..
  2. ???? Access ??????? ??????
  3. Visual Basic Editor ????? ?? ??? ALT + F11 ??????
  4. Visual Basic ?????? ????? ??? ????? ??????????????? ????????????? ??..

    ???????????????? ????? ???, ?? ??? ???? ?????? ?? ????? ????
???:?? ?? ???? ?????? ?? ??? ????, ?? ?????? ?? ????? ???? ?? ??? ??? ???? ?????? ????? ?? ??????? ??????? ?? ??? ???? ????

???? ?????? ?????????, ?? ???????? ????????? ?? ?? ???????? ????????? pertinent ????? ?? ???? ??? ?? ??????? ?? ?????? ???????? ?????? ?? ??? pertinent ???? ??? ????????????? ????? ?? ??????? ?? ??? ?? .. ???????, ??? ????? ???? ???? ??, ????? ??? ??? ??????? ??????? ?? ???? ???????? ?? ????? ?? ????

?? VBA ?????? ?? ????? ??, ?? ??? ????? ????? ????? ???? ?? ??:
  • ????? ?????? ???? ?? ?? ???? ???????? ???? ???? ?? ??? ???
  • ????? ?? ??????? ??? ?? ????
    RefLibPaths
    ??? ???????? ???? ???? ??? ????? ??, ?? ????????? ????? ????? ???

    ???
    RefLibPaths
    ????????? ????? ?????, ?????? ?? ?? ??? ?? ?????? ?? ??? ??? ???????? ??? ?? ??? ????? ???? ??? ??? ??? ??, ?? Access ??? ?????? ?? ?? ??? ??? ??? ????? ??? ???

    ???:???????? ??? ?? ???? ???? ???
    RefLibPaths
    ??? ?? ????? ?? ??????? ??? ???????????? ?? ?? ???? ??-???? ?? ????????? ?? ?? ???, ???? ??? ?? ????????? ????? ???? ???? ???
    RefLibPaths
    ????????? ?????? ??? ???? ?? ???, ????? ????? ?? ???? ????::
    1. ????? ????,????????? ????-????? ????, ?? ???? ????????.
    2. ??????????????? ???,regedit?? ????-????? ????, ?? ???? ???OK.
    3. ????????? ?????? ????? ??? ????? ????????? ????? ?? ?????? ?????:
      ????? 2007:
      HKEY_LOCAL_MACHINE\Software\Microsoft\Office\12.0\Access

      ????? 2003:
      HKEY_LOCAL_MACHINE\Software\Microsoft\Office\11.0\Access

      ????? 2002:
      HKEY_LOCAL_MACHINE\Software\Microsoft\Office\10.0\Access

      ????? 2000:
      HKEY_LOCAL_MACHINE\Software\Microsoft\Office\9.0\Access

      ????? 97:
      HKEY_LOCAL_MACHINE\Software\Microsoft\Office\8.0\Access

    4. ????-????? ?????????????????? ?????, ?? ??? ?????????? ????-????? ????, ?? ???? ????????.
    5. ?? ???? ?? ????? ?? ???RefLibPaths.
    6. ????? ????,RefLibPaths.
    7. ???? ??? ??? ???? ?? ????-????? ????, ?? ???? ??????????? ???.
    8. ?? ???? ?? ???????? ??? ?? VBA ?????? ?? ??? ??? ???? ??? ?? ????? ???? ????
    9. ???????? ??? ??? ???? ?? 8 ???, ?? ???? ??? ????-????? ??????????? ????.
    10. ????????????? ?? ?????? ????????? ????? ???, VBA ??? ?????? ?? ??? ???? ???? ?? ??? ??? ???? ?????? ????? ?? ????? ??????

      ????????? ??? ??? ????????? ?? ??? ????? ?? ??? ???? ?????? ??? ?? ?? ????? ??? ????? (??? ????) ???? ?????? ??? ?????? ?? ???, ??? ?? ????????? ????? ??????? ?? ??? ?? ?????? ??? ??, ?? ?? ??? ???? ??? ????? ???:
      • ??? ???: Northwind.mdb
      • ??? ????: C:\Program Files\Microsoft Office\Office11\Samples\Northwind.mdb
    11. ??? 10 ??? ????? ?? ??? ?? ??????? ??-???? ?? ?? ??????? ???????????? ?? ????? ?? ???????? ??? ?? ??? ??? ????? ?? ??? ?? ?????? ?? ??? 7 ????????
    12. ????? ???????????? ??,exit.
  • ????? ?? ?????SearchPath??? ???????? ???? ?? ??? ??? ???? ?? ??? API
    RefLibPaths
    ????????? ????? ????? ???? ??, ?? ??? ?? ?????? ??? ???? ??? ????? ??? ?? ?? ????
    ?? ?????? ?? ??????? ?????? ?????? ?? ??????? ????
    ??? ????????????:
    ????????? ??????????Msaccess.exe ?? ????? ???
    ??????? ???????????? ????? ??? ???? ????? ???????????????????? ???????????? ??..
    ?????? ???????????????? ??????? ?? System32 ??????? ??? Windows ??????? ?? WINNT ??????? ??? ????? ????
    WinDir??????? ???? ???????? ?????? ??????? ?????? ?? ?????????? Windows ??????? ?? WINNT ?????? ???
    ?? ??????? ???? ?????? ?? ?? ?????? ?????? ???? ????? ??????? ?? ???? ??? ???

    ???-????? Microsoft Windows NT 4.0:, ???????? ???? ??? ??????????????? ????, ?? ???? ????????????? ?? ????? ????.. ?? ??????? ??? ???????? ?????? ????

    Microsoft Windows 2000, Microsoft Windows XP ?? Microsoft Windows Server 2003: ??? ???????? ???? ???, ???-????? ??????????, ????? ???????????? ????? ????, ?? ???? ????????? ??. ?? ??? ???????? ?????? ????

    Microsoft Windows Vista:, ???????? ???? ??? "?????? ?? ??????" ???? ?? ?????? ????? ????,??????????? ????,????? ?????? ????????, ????? ???????????? ????? ????, ?? ???? ????????? ??. ?? ??? ???????? ??????
    ???? ?? ???????????????? ?????? .MDB ?????, .MDE ?????, .ADP ????? ?? .ade ?????, ?? ??? ?? ???????? ???
???:????? ?? ???????? ???? ??
RefLibPaths
????????? ????? ??? ?????? ?? ??? ?? ??? ????? ?? ???? ?????? ??? ????? ??? ?? ??????????? ??? ????? ???

??? Access ?????? ?? ???? ???? ???? ??, ???? ????? ?????? ????? ??????? ???? ??? ?? ?? ????? ?? ?????? ???? ????????? ?? ????????? ?????? ????:
Microsoft Office Access ??????? ?? ????????? ????? ??? ?? ?????? ?????? ??? ???????? ???.

* ????????? ???? ?? ??? ?? ??????? ?? ????????? ????? ??? ??? ??, ?? ?? ?????? ?? ??? ???? ?????
???:??????? ???? ??, ?? ?? ????? ?????? ????? ??????? ???????? ??? ?????? ?? ??? ?? ????

For example, if you open MyDatabase.mdb and MyDatabase.mdb is missing a reference to the Microsoft Calendar Control and to the Microsoft DAO library, you receive two error messages, one for each missing reference. You do not receive the error messages again unless you do not fix the references, you close the database, and then you reopen the database. If you fix the references and then you save the database, you do not receive the error messages the next time that you open the database.

The BrokenReference property

The?????????object for Access has aBrokenReference??? ?? ?? ???? ???? ?? ?????? ??? ???? ???? ???? ?? ???BrokenReference??? ?? ???, ????? ????? ?? ???? ????:
  1. Access ?? ??????? ????..
  2. ???? Access ??????? ??????
  3. Visual Basic Editor ????? ?? ??? ALT + F11 ??????
  4. ??????? ????? ?? ????? ?? ??? CTRL+G ?????..
  5. ??????? ????? ??? ????? ???? ???? ????, ?? ???? ??? ENTER ?????:
    ? Application.BrokenReference
    ?? ?????BrokenReference?? ??? ???????????????????? True ???? ?? ??? ???????? ?????? ???? ??????,BrokenReference??? false ???? ???

??????

?????? ?? ???? ??? ???? ??????? ?? ??? ????? ????Microsoft Visual ??? ???????? ???????????, ???????????? ???????????????? ?? ????????? ??? ??? ????? ???, ?? ???? ??? ????? ??????? ??????? ???????? ?? ??????

???????? ?????? ?? ???? ??? ???? ??????? ?? ??? Microsoft ???????? ??? ???? ????? ?? ??? ????? ???? ?????? ?? ????? ????:
283806  (http://support.microsoft.com/kb/283806/ ) ????????? (VBA) ?????? ?? ??? Visual Basic ?????? ???????? ?? ??? ?? ??????? ??? ????? ???

???? ???? ???? ??:
  • Microsoft Office Access 2007
  • Microsoft Office Access 2003
  • Microsoft Access 2002 Standard Edition
  • Microsoft Access 2000 Standard Edition
  • Microsoft Access 97 Standard Edition
??????: 
kbPubTypeKC kbvba kbprogramming kbinfo kbregistry kberrmsg kbmt KB824255 KbMthi
???? ?????? ???????????? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:824255  (http://support.microsoft.com/kb/824255/en-us/ )