Anyone know why this doesn't work?
Well, let me rephrase it doesn't work correctly. It DOES go and check the IP address like it should HOWEVER, it's not checking to see if the IP field is empty.
I want the button to check the field IP to see if there actually IS an entry. If not, pop a message box up go back to the form. Else, run the query on the website. This DOES run the query but it's not checking the field. I leave it blank and it still tries to search.
Code:
Private Sub btn_iplookup_Click()
If Me.IP = Null Then
MsgBox "No IP Address Found", vbOKOnly
Else
Me.btn_iplookup.HyperlinkAddress = "http://freegeoip.net/?q=" & Me.IP
Me.btn_iplookup.Hyperlink.Follow True
Me.btn_iplookup.HyperlinkAddress = ""
End If
End Sub
Any help would be greatly appreciated.
Thanks.