Yes, the search button is named cmd_findipaddress0.
So, what I have now is a text box that has:
Code:
Private Sub txt_findipaddress0_AfterUpdate()
If IsNull(Me.txt_findipaddress0) Then
Me.FilterOn = False
Else
Me.Filter = "[IPAddress] Like " * " & [Forms]![frm_findipaddress1]![txt_findipaddress0] & " * ""
Me.FilterOn = True
End If
End Sub
and a search button that has (I converted the macro to code since I'm more familiar with code):
Code:
Private Sub cmd_findipaddress0_Click()
On Error GoTo cmd_findipaddress0_Click_Err
DoCmd.ApplyFilter "", "[IPAddress] Like ""*"" & [Forms]![frm_findipaddress1]![txt_findipaddress0] & ""*""", ""
cmd_findipaddress0_Click_Exit:
Exit Sub
cmd_findipaddress0_Click_Err:
MsgBox Error$
Resume cmd_findipaddress0_Click_Exit
End Sub
When I enter in a couple octets of an IP address in txt_findipaddress0 and click Search, I get an error that says "Run-time error '13': Type mismatch". When I click debug, it highlights the Me.Filter = "[IPAddress] Like "*"... line. From past errors, this always dealt with the way the field is defined, in this case the IPAddress field is Short Text. Not sure if that has anything to do with it but figured I'd put it here.
Thank you.