I'm working on my Db; when a customer record form is opened the system checks the status of their IP Address. But some will not have an IP address listed. So I'm trying to code in that if the IP address field is bank then to exit the routine but i seem to be getting stick and have an error message else without if??
Code:
'Display The Status Of The IP Address
If Me.CustRelationshipType = "2" Then
If Me.txtRadIPaddress Is Null Then
Exit Sub
Else
Dim strComputer As String
strComputer = txtRadIPaddress
If Not SystemOnline(strComputer) Then
'Display A Message / or Action
'MsgBox "Local IP Ping Test Failed: " & strComputer, vbOKOnly, "Failed"
Me.txtIPstatus = "Fail"
Else
'MsgBox "Local IP Test Successful", vbOKOnly, "Passed"
Me.txtIPstatus = "Online"
End If
DoCmd.SetWarnings True
Else: End If
End Sub