What do you want to do with the results of the ping? One quick and dirty
way would be like this:
'------ start of button code -------
Private Sub cmdPing_Click()
If IsNull(Me.txtIPAddress) Then
DoCmd.Beep
Else
Shell "ping.exe " & Me.txtIPAddress, vbNormalFocus
End If
End Sub
'------ end of button code -------
That will do the ping in a command window, which will close as soon as the
command is executed. If that approach is okay, but you want the command
window to stay open, you can do this instead:
Shell "cmd /k ping.exe " & Me.txtIPAddress, vbNormalFocus
If you need to programmatically process the output of the ping, you could
probably set up the command line to redirect the output to a file, then read
that file to see what happened.
--
Dirk Goldgar, MS Access MVP
Access tips:
www.datagnostics.com/tips.html
(please reply to the newsgroup)