Thanks Crystal - Actually the calling application is not MS Access, its a VBS.
Best,
~ozair
On Mon, Dec 18, 2023 at 11:32 PM, crystal (strive4peace) wrote:
hi Ozair,
if you have something you want to schedule that runs from another database, one way to do it may be to link the the same tables that your application uses -- and import any queries or other code you might need.
kind regards,
crystalOn 12/18/2023 2:28 PM, Paul Baldy wrote:Completely untested, but you can try GetObject instead of CreateObject, or perhaps the method Daniel shows at the top here:Paul------ Original Message ------From: "ozair" <ozairkhalid@hotmail.com>Sent: 12/18/2023 9:25:07 AMSubject: [MSAccessProfessionals] Experiment with Timer & VBSHi,This is an experimental task.I wanted to call MS Access file's function from, from a VBS file.It works good but when I again run the VBS, it opens ANOTHER instance of MS Access. (this is undesirable).
It should call the function without opening another MS Access file.
All subsequent calls to the function must be answered from the file already opened.Idea's background;The original idea is to avoid using TIMER inside MS Access file. Instead create a VBS that calls MS Access file's function.That VBS is then added to Windows Task Scheduler. I hope this would help MS Access file remain stable.TIA~ozair'Code in the VBS fileSet accessApp = CreateObject("Access.Application")accessApp.OpenCurrentDataBase "C:\Users\ozair\Desktop\DB1.accdb"accessApp.UserControl = trueaccessApp.Run "HelloMsg"'Function in MS Access file [Module]Public Function HelloMsg()MsgBox "Hello World!", vbExclamationEnd Function
_._,_._,_
Groups.io Links:
You receive all messages sent to this group.
View/Reply Online (#116509) | Reply To Group | Reply To Sender | Mute This Topic | New Topic
Your Subscription | Contact Group Owner | Unsubscribe [sugeng.panjalu.access@blogger.com]
_._,_._,_
Tidak ada komentar:
Posting Komentar