How about this :

VB Code:
  1. Public Sub HostConnect2()
  2.     Dim EverythingOk As Boolean
  3.     EverythingOk = True
  4.     EverythingOk = InStr((GetSetting("DMcom", "Host", "name", "notfound") & GetSetting("DMcom", "Host", "ip", "notfound") & GetSetting("DMcom", "Host", "port", "notfound")), "notfound") = 0
  5.     If EverythingOk Then
  6.         'connect to server
  7.     Else
  8.         'show screen to get settings from user.
  9.         'allow user to cancel connection from there, or try to connect again
  10.         'the connect option should then call this sub again
  11.     End If
  12. End Sub