ms access - Checking network connection using vba -


is there way check network connection in vba?

i using command:

if dir("o:\") = ""     msgbox "you have network connection" else     msgbox "no connection" end if 

but doesnt work , getting run time error

what doing correct except flip if , else parts,

i.e. when dir("o:\") = "" = you not connected

and when returns means have connection.

the dir function used return first filename specified directory, , list of attributes.

sub test_connection()   if (len(dir("o:\")))   msgbox "connected"  else   msgbox "no connection"  end if  end sub 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -