Greetings,
I am trying to creget this code to work. It works when i'm searching for text but I can't seem to get it to search for numerical values such as an ID number.
Private Sub idsearch_Click()
Dim strName As String
Dim caption As String
Dim Prompt As String
Prompt = "What ID Number Would You Like to Search For?"
caption = "ID Number Search"
strName = Val(InputBox(Prompt, caption))
Range("Table_owssvr_1[ID]").Select
Selection.AutoFilter Field:=1, Criteria1:="strName", Operator:=xlAnd
End Sub
Any ideas on how to fix it?
I am trying to creget this code to work. It works when i'm searching for text but I can't seem to get it to search for numerical values such as an ID number.
Private Sub idsearch_Click()
Dim strName As String
Dim caption As String
Dim Prompt As String
Prompt = "What ID Number Would You Like to Search For?"
caption = "ID Number Search"
strName = Val(InputBox(Prompt, caption))
Range("Table_owssvr_1[ID]").Select
Selection.AutoFilter Field:=1, Criteria1:="strName", Operator:=xlAnd
End Sub
Any ideas on how to fix it?