Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 211
  • Last Modified:

Check for a reference

I have an Access Project that writes to MS Project.  We used it on Citrix, which was fine.  NOw, the have the database running from some local machines, and those machines use other features that don't have Project.   The user gets the attached message  and it kicks them out of the run-time version.  They never can even open the app.

I obviously can't turn off the Reference in VB or the code erros when it creates the object.

How can I dynamically have this work based on if Project is installed???
project-missing-reference.jpg
0
sharpapproach
Asked:
sharpapproach
1 Solution
 
danishaniCommented:
Check this thread out about References and how to deal with it;
http://www.accessmvp.com/djsteele/AccessReferenceErrors.html

HTH,
Daniel
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
I would look up CreateObject in VBA Help, and use late binding, eliminating the need for setting a Reference to Project.

There is an example showing how to do this for Excel in the Help file.  Project would be the same.

mx
0
 
Nick67Commented:
Late binding would work as @mx says
You'd also have to work out which parts of the db use the Project code and build some logic that detects if Project is not installed, then stuff hides, disappears or exits nicely.
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
thx for agreeing with me (again) Nick :-)

mx
0
 
sharpapproachAuthor Commented:
worked perfect!  Thanks.
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Tackle projects and never again get stuck behind a technical roadblock.
Join Now