Open an access vba function in a form using javascriptHi,<br/><br/>I have created an access vba function which I now want the ability to call from a SharePoint page via JavaScript.  Here's what I have thus far:<br/><br/> <div style="background-color:white;color:black"> <pre><span style="color:blue">function</span> test() {<br/><span style="color:blue">var</span> App = <span style="color:blue">new</span> ActiveXObject(<span style="color:#a31515">&quot;Access.Application&quot;</span>)<br/>App.Visible = <span style="color:blue">true</span>;<br/>App.OpenCurrentDatabase(<span style="color:#a31515">&quot;fullPath&quot;</span>);<br/>App.Run(<span style="color:#a31515">&quot;Module1!test&quot;</span>)<br/>} </pre> </div> The Module's name is Module1 and the function is called test.  It appears that everything works OK until line:<br/><br/> <div style="background-color:white;color:black"> <pre>App.Visible = <span style="color:blue">true</span>; </pre> </div> Then the problem occurs in the next line:<br/><br/> <div style="background-color:white;color:black"> <pre>App.OpenCurrentDatabase(<span style="color:#a31515">&quot;fullPath&quot;</span>); </pre> </div> Has someone tackled this before?  Thank you!<br/><br/><br/>BTW,  I'm calling the function from a SharePoint page as follows:<br/><br/> <div style="background-color:white;color:black"> <pre><span style="color:blue">&lt;</span><span style="color:#a31515">div</span><span style="color:blue">&gt;</span> <span style="color:blue"><span style="color:#000000"> </span>&lt;</span><span style="color:#a31515">form</span><span style="color:blue">&gt;</span> <span style="color:blue"> &lt;</span><span style="color:#a31515">input</span> <span style="color:red">type</span><span style="color:blue">=</span><span style="color:blue">&quot;button&quot;</span> <span style="color:red">value</span><span style="color:blue">=</span><span style="color:blue">&quot;Click me!&quot;</span> <span style="color:red">onclick</span><span style="color:blue">=</span><span style="color:blue">&quot;test()&quot;</span> <span style="color:blue">/&gt;</span> <span style="color:blue"> &lt;/</span><span style="color:#a31515">form</span><span style="color:blue">&gt;</span> <span style="color:blue">&lt;/</span><span style="color:#a31515">div</span><span style="color:blue">&gt;</span> </pre> </div>© 2009 Microsoft Corporation. All rights reserved.Mon, 13 Jul 2009 17:20:50 Z2ec55649-9218-4dcb-a660-be6a22200fbdhttp://social.msdn.microsoft.com/Forums/en-US/isvvba/thread/2ec55649-9218-4dcb-a660-be6a22200fbd#2ec55649-9218-4dcb-a660-be6a22200fbdhttp://social.msdn.microsoft.com/Forums/en-US/isvvba/thread/2ec55649-9218-4dcb-a660-be6a22200fbd#2ec55649-9218-4dcb-a660-be6a22200fbdCondor10101010101http://social.msdn.microsoft.com/Profile/en-US/?user=Condor10101010101Open an access vba function in a form using javascriptHi,<br/><br/>I have created an access vba function which I now want the ability to call from a SharePoint page via JavaScript.  Here's what I have thus far:<br/><br/> <div style="background-color:white;color:black"> <pre><span style="color:blue">function</span> test() {<br/><span style="color:blue">var</span> App = <span style="color:blue">new</span> ActiveXObject(<span style="color:#a31515">&quot;Access.Application&quot;</span>)<br/>App.Visible = <span style="color:blue">true</span>;<br/>App.OpenCurrentDatabase(<span style="color:#a31515">&quot;fullPath&quot;</span>);<br/>App.Run(<span style="color:#a31515">&quot;Module1!test&quot;</span>)<br/>} </pre> </div> The Module's name is Module1 and the function is called test.  It appears that everything works OK until line:<br/><br/> <div style="background-color:white;color:black"> <pre>App.Visible = <span style="color:blue">true</span>; </pre> </div> Then the problem occurs in the next line:<br/><br/> <div style="background-color:white;color:black"> <pre>App.OpenCurrentDatabase(<span style="color:#a31515">&quot;fullPath&quot;</span>); </pre> </div> Has someone tackled this before?  Thank you!<br/><br/><br/>BTW,  I'm calling the function from a SharePoint page as follows:<br/><br/> <div style="background-color:white;color:black"> <pre><span style="color:blue">&lt;</span><span style="color:#a31515">div</span><span style="color:blue">&gt;</span> <span style="color:blue"><span style="color:#000000"> </span>&lt;</span><span style="color:#a31515">form</span><span style="color:blue">&gt;</span> <span style="color:blue"> &lt;</span><span style="color:#a31515">input</span> <span style="color:red">type</span><span style="color:blue">=</span><span style="color:blue">&quot;button&quot;</span> <span style="color:red">value</span><span style="color:blue">=</span><span style="color:blue">&quot;Click me!&quot;</span> <span style="color:red">onclick</span><span style="color:blue">=</span><span style="color:blue">&quot;test()&quot;</span> <span style="color:blue">/&gt;</span> <span style="color:blue"> &lt;/</span><span style="color:#a31515">form</span><span style="color:blue">&gt;</span> <span style="color:blue">&lt;/</span><span style="color:#a31515">div</span><span style="color:blue">&gt;</span> </pre> </div>Fri, 10 Jul 2009 23:23:59 Z2009-07-10T23:26:17Zhttp://social.msdn.microsoft.com/Forums/en-US/isvvba/thread/2ec55649-9218-4dcb-a660-be6a22200fbd#de8127bc-8e5a-4948-a538-3a7fdf258946http://social.msdn.microsoft.com/Forums/en-US/isvvba/thread/2ec55649-9218-4dcb-a660-be6a22200fbd#de8127bc-8e5a-4948-a538-3a7fdf258946BrijrajRathodhttp://social.msdn.microsoft.com/Profile/en-US/?user=BrijrajRathodOpen an access vba function in a form using javascriptHello, <br/> <br/> use below test function in your code. and please go through comments. Thanks.<br/> <br/> function test()<br/> {<br/>         var App = new ActiveXObject(&quot;Access.Application&quot;)        <br/>         //use double \\ for path, if required. <br/>         var fullPath=&quot;C:\\work Station\\Access Group\\Open Access Using Java Script\\OpenAccessUsingJavaScript.mdb&quot;;   <br/>         //first open data base then set property of visible to true.<br/>         App.OpenCurrentDatabase(fullPath);<br/>         App.Visible = true;<br/>         App.Run(&quot;test&quot;); // i am calling test procedure, which is public in module, no need to apply module name to call it.<br/> }<hr class="sig">Rgrds, Brij http://accessvbadeveloper.wordpress.comSun, 12 Jul 2009 07:45:22 Z2009-07-12T07:45:22Zhttp://social.msdn.microsoft.com/Forums/en-US/isvvba/thread/2ec55649-9218-4dcb-a660-be6a22200fbd#e816a34a-1e3b-4040-9da7-aae71950d615http://social.msdn.microsoft.com/Forums/en-US/isvvba/thread/2ec55649-9218-4dcb-a660-be6a22200fbd#e816a34a-1e3b-4040-9da7-aae71950d615Condor10101010101http://social.msdn.microsoft.com/Profile/en-US/?user=Condor10101010101Open an access vba function in a form using javascriptThank you VBA - Developer!  Adding the extra slash to my path did the trick!  Appreciate your help!Mon, 13 Jul 2009 17:20:41 Z2009-07-13T17:20:41Z