View Single Post
Old 06-23-2009   #3 (permalink)
Jeff C


 
 

RE: Calling a VBScript from Access

"DetRich" wrote:
Quote:

> Hello,
>
> I have an Access application from which I need to call a vbscript which will
> ping a server and display results to the user.
>
> In Access, a form displays a record. This record has the hostname of a
> server. When clicking the "Ping Server" command button, the vbscript should
> be called.
The form is displaying the hostname in a textbox which you can reference in
your VB script ie: me.txtboxname

The "OnClick" event should have your VBscript copied into it refencing the
txtbox as above. In Access rather than using "SHELL" to run the *.vbs file
you can just use the content on the vbs file and with modest changes it
generally runs fine.
Quote:

>
> I need to know how to pass the hostname of the server to the ping command.
> Can anyone help me understand how to pass this hostname to the script so that
> the correct server is returned? The script can either interpret the results
> and display a success or fail message or the results of the ping can be
> written to a file and the script can read the file, then display the results.
>
> TIA,
> DetRich
My System SpecsSystem Spec