Why don't you get the system to check for a file that you know exists on drive Z:?
EG
if not directory("Z:\known folder\known file.txt")
>Dear Experts
>
>I connect map network mannually as
>
>My computer --> Map Network Drive --> ..........
>
>
>I use following commands to check whether network drive is connected or not
>
>
>if not directory("Z:\")
> messagebox("No Network Connection",0+16+256,"Accounts System")
> clear events
> quit
>else
> messagebox("Network Connection Exists",0+16+256,"Accounts System")
>Endif
>
>
>After this Z drive is shown with other Hard Disks.
>
>Sometimes it says:
>
> messagebox("No Network Connection",0+16+256,"Accounts System")
>
>
>But Z drive is still exists in my computer.
>
>Then I disconnect Map Network Drive and connect again
>
>Ater this I following messages is displayed
>
>
>messagebox("No Network Connection",0+16+256,"Accounts System")
>
>
>Why to repeat this again and again?
>
>I think the problem is in this line
>
>
>if not directory("Z:\")
>
>
>I want to ask, is there any other command to check network drive connection?
>
>
>Please help
Rob