referencing at startup

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If I copy a database and send it to another location (server), how do I
reference the references needed to run the program at the other location? Do
I have to have the user manually go into to the code and select the
appropriate references or is there code I can write to apply the necessary
references? For example, I need the graphs/chart referenced and whenever I
sent the database, this was no longer referenced whenever the person tried
opening up the Access database.

Thanks for any assistance you can provide.
 
One way is on the development machine, build a list of all of the references
you're using:

Sub ListReferences()
Dim refCurr As Reference

For Each refCurr In Application.References
Debug.Print refCurr.Name & ": " & refCurr.FullPath
Next

End Sub

Rather than writing to the Immediate window, change that to store the full
path in a table. Then add logic that, everytime the application opens, reads
through the table and checks that those files exists on the machine. (If you
want a bit better solution, incorporate the code in
http://www.mvps.org/access/api/api0065.htm at "The Access Web" so that
you're storing the specific version of each file, and check that not only
each file is in the correct place on the client machines, but also that
they're the correct version)

You might also check what MichKa has at
http://www.trigeminal.com/usenet/usenet026.asp
 
Back
Top