Hi, I'm trying to use an external script (like powershell, vbscript, jscript) to call the event handler for the click event of a Command button. Using ms-access 2010 on Windows 7 (64-bit). Or to send the click event itself. Can't figure it out. suggestions?
That's the gist of it, but here's more information which might help...
I am able to create a VBA standard module in Access and create a simple wrapper function that calls the event handler, i.e.
Public Function MyWrapperFunction()
Call MyForm.MyPushButton_Click
End Function
I am able to call this wrapper function from an external powershell script, i.e.
$accApp = New-Object -ComObject Access.Application
$accApp.OpenCurrentDatabase("c:\folder\myAccessDat abase.mdb")
$accApp.Visible = $True
$accApp.run("MyWrapperFunction")
But I would prefer to just call the event handler, MyForm.MyPushButton_Click, directly from the external script.
The main reason is because I'm not the developer of the access database, I'm just the developer of the external script.