Results 1 to 2 of 2
2002-01-05, 10:17 #1
- Join Date
- Jul 2001
- Thanked 0 Times in 0 Posts
Can i stop autoexec from running (Access 2000)
I have placed a similar question yesterday but i think i was not clear enough what i wanted and therefore
i would like to perephrase my problem with another thread.My question is,How can i stop autoexec command from running?I have an autoexec macro based on the RunCommand function called "auto" in my case, which is:
Public Function auto()
If Dir("C:bebe.mdb ", vbNormal) = "" Then
So if the database is present,then the autoexec works.But i want that the autoexec does not work and quit the datbase in case the other database in my case be.mdb is not present or is not available.I have some strong reasons to want that but this is beside the point.
My question is how can i stop the autoexec macro from running.
In my case, when he databse is opened, and the database "C:bebe.mdb ", vbNormal is missing,then i receive the message
" you cant exit Mictrosoft Access now" And the next message is also on : if you are runing Visual Basic module that is using OLE or DDE you need to interrupt the module"
Is there any way to stop the execution of the autoexec macro,claose the database or make it impossible to open?
I will be very grateful for the help i may receive
2002-01-05, 17:41 #2
- Join Date
- Dec 2000
- Sacramento, California, USA
- Thanked 1 Time in 1 Post
Re: Can i stop autoexec from running (Access 2000)
Is <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=acc&Number=105176&page= 0&view=collapsed&sb=5&o=186&fpart=>this</A> the thread you're referring to? It's better not to scatter bits of threads on the same subject all over the Lounge.
As in the other thread, you need to clarify your question. I assume your autoexec macro is calling the Auto() routine, right? You can't stop the autoexec from running, you can only change what happens in the Auto() function. Change the line DoCmd.Quit, which closes the database, to Application.Quit, which closes Access.Charlotte