I was moved from a project for a while and then brought back to it. I had two programs that were being used in this project. I had a process set up that used something similar to the following line of code:
Shell "WScript " & """C:\MyFolder\MyFile.vbs"""
This would run a script that would close the first Access program and open another Access program. The other program used something similar, only it was in another folder. The idea is to open and close these two programs programmatically versus closing and opening them manually.
What I found upon my return was that instead of leaving the file in the folder it was designed to be in, it was copied to the desktop, instead of using the shortcut on the desktop. Once the script was run, it would open the file in the folder, not the one on the desktop.
This has created problems. I have to make changes on the fly and update the databases. If I update the one in the folder, and they use the one on the desktop, there is sometimes a problem.
Without saying too much more, my question is this. Can I get the program to recognize that it is not in the correct location when it is opened? If they copy it to the desktop and open it there, can I get it to shut down or give a warning message, or? I am open to suggestions?
Thank you.
Shell "WScript " & """C:\MyFolder\MyFile.vbs"""
This would run a script that would close the first Access program and open another Access program. The other program used something similar, only it was in another folder. The idea is to open and close these two programs programmatically versus closing and opening them manually.
What I found upon my return was that instead of leaving the file in the folder it was designed to be in, it was copied to the desktop, instead of using the shortcut on the desktop. Once the script was run, it would open the file in the folder, not the one on the desktop.
This has created problems. I have to make changes on the fly and update the databases. If I update the one in the folder, and they use the one on the desktop, there is sometimes a problem.
Without saying too much more, my question is this. Can I get the program to recognize that it is not in the correct location when it is opened? If they copy it to the desktop and open it there, can I get it to shut down or give a warning message, or? I am open to suggestions?
Thank you.