If i were to mark the code you posted, I would give a 1 out of 10. And the 1 is for trying...
No indentation AT ALL !
Functions that don't return anything, make them a SUB
Use Private/Public in general declarations of a module, NOT Dim
Global is obsolete, use Public
You have error labels, but On Error Resume Next

, you should have "On Error GoTo errhandle"
You are accessing a form from a Module ! Always pass Objects through sub/function parameters. What if I did not have the frmMain or Form3 ???
You have 3 functions that do exactly the same thing !
You are using
End 
, always use "Unload objectname"
The Connect function uses static LogIn, you should pass those values as parameters