Solved

How do you stop missing or broken reference message

Posted on 2004-09-02
3
311 Views
Last Modified: 2008-02-01
I have code in my startup form that fixes broken references. However, before the form loads I get the message: " Your myname database or project contains a missing or broken reference to the file ..........

How do I stop that message?
0
Comment
Question by:kbutler
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
pdebaets earned 500 total points
ID: 11968249
You have to be careful not to call or load any code that requires one of your broken references before you fix the references.

Access will load modules "as-needed". So put your code that fixes references in a separate module and make sure that there is no other code in that module that requires one of your broken references. Make sure no forms are loaded at startup that run code that requires one of the broken references.

Then using an autoexec macro, call your function (and only your function) that fixes the references. This will load only the reference-fixing module, and not any of the others. At the end of your function that fixes the references, call your startup procedure that exists in another module using the Eval function. Ex.:

varRtn = Eval("MyStartupFunction")

This way, it is only when the Eval function executes that your subsequent modules will be loaded, and you will have the references fixed by then.

Hope this helps
0
 
LVL 12

Expert Comment

by:pdebaets
ID: 11968260
Actually, I think this is the way to do it:

varRtn = Eval("MyStartupFunction()")
0
 

Author Comment

by:kbutler
ID: 11969182
Thanks
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question