A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

using a Macro to check IsBroken in an MDE



 
 
Thread Tools Display Modes
  #1  
Old May 11th, 2005, 05:11 AM
david epsom dot com dot au
external usenet poster
 
Posts: n/a
Default using a Macro to check IsBroken in an MDE

In an MDE, Access 2000 does not correctly load the Current VBA project if
any library .MDE files are missing. This makes it impossible to use ANY
code in the base MDE to check library MDE references at startup.

However, you can use an Autoexec macro to check references:

In startup, remove the startup form.

Create a new macro

In design view, right Click on the macro caption, and show conditions.

In the conditions column, put code like this:

[application].[References].[Item](3).[IsBroken]
....
[application].[References].[Item](4).[IsBroken]
....

The ellipsis (...) repeats the previous condition, allowing you group
sections of macro commands.

For the macro Actions, put code like this:
Msgbox
Quit
Msgbox
Quit

OpenForm

Save the macro as Autoexec

Use the Msgbox to display an informative message: Quit after finding a
broken reference, and if no broken references are found, continue to your
Startup form.

(david)



  #2  
Old May 12th, 2005, 06:26 AM
Allen Browne
external usenet poster
 
Posts: n/a
Default

Thanks for posting this solution, David.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"david epsom dot com dot au" david@epsomdotcomdotau wrote in message
...
In an MDE, Access 2000 does not correctly load the Current VBA project if
any library .MDE files are missing. This makes it impossible to use ANY
code in the base MDE to check library MDE references at startup.

However, you can use an Autoexec macro to check references:

In startup, remove the startup form.

Create a new macro

In design view, right Click on the macro caption, and show conditions.

In the conditions column, put code like this:

[application].[References].[Item](3).[IsBroken]
...
[application].[References].[Item](4).[IsBroken]
...

The ellipsis (...) repeats the previous condition, allowing you group
sections of macro commands.

For the macro Actions, put code like this:
Msgbox
Quit
Msgbox
Quit

OpenForm

Save the macro as Autoexec

Use the Msgbox to display an informative message: Quit after finding a
broken reference, and if no broken references are found, continue to your
Startup form.

(david)



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Playing a macro from another workbook Jim General Discussion 1 February 23rd, 2005 10:12 PM
How do I check the query record count from a macro? Robert_L_Ross Running & Setting Up Queries 3 October 29th, 2004 10:08 PM
macro to spell check in Spanish Linda H General Discussion 4 July 8th, 2004 04:34 AM


All times are GMT +1. The time now is 06:34 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.