Home  |   French  |   About  |   Search  | mvps.org  

What's New
Table Of Contents
Credits
Netiquette
10 Commandments 
Bugs
Tables
Queries
Forms
Reports
Modules
APIs
Strings
Date/Time
General
Downloads
Resources
Search
Feedback
mvps.org

In Memoriam

Terms of Use


VB Petition

Modules: References Wizard

Author(s)
Terry Kreft

INFORMATION PROVIDED IN THIS DOCUMENT AND THE MDBSHELL UTILITY ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED. THE USER ASSUMES THE ENTIRE RISK OF RUNNING THIS SOFTWARE.

Ó Terry Kreft (1998-2002), All Rights Reserved

  Download wzRef.Zip (size: 150,864  bytes)

  Note: If you're distributing this wizard along with your MDE application as part of your runtime application and you experience any problems, try distributing the MDA file as an MDE.


The References Wizard can be used to check whether the references for a database are valid.

This can be achieved in two ways.

1) use the Add-In manager from Tools/Add-Ins to install the Reference Wizard as an Add-In, you can then use the References Wizard in the same way as any other Add-In.

2) copy or move the References Wizard to the MSAccess directory on your hard drive (if you install it as an Add-In as at 1 above then this should be done for you by the Add-In wizard), then call the wzRef_Test function from code as follows, make sure this is the first piece of code run:

'************* Code start ***********
Private Sub Checkref()
  On Error GoTo wzref_Err
  Application.Run "References Wizard.wzRef_Test"
wzref_End:
  Exit Sub
wzref_Err:
  Select Case Err
    Case 2517
      'establish a reference
      Dim strRef As String
      strRef = Application.SysCmd(acSysCmdAccessDir)
      strRef = strRef & "wzref.MDA"
      Application.References.AddFromFile strRef
      Resume
    Case Else
      VBA.MsgBox VBA.Err & ": " & VBA.Err.Description
  End Select
End Sub
'************ Code End *************


If the database references are OK there will be no user interaction, if there are any broken references then the "References Information" form will appear, as if you had run the References Wizard from the Add-In menu.

Contact Information
-------------------
If you have any comments or suggestions then you can contact me, Terry Kreft,  or Dev Ashish.


© 1998-2010, Dev Ashish & Arvin Meyer, All rights reserved. Optimized for Microsoft Internet Explorer