Also noticed that Variable "Password" is being passed into the function.......
Public Function InitConnect(Optional UserName As String, Optional Password As String) As Boolean
..........but you are using variable "PWD" as part of the connection string in your querydef
With qdf
.Connect =...