There may be a better way to solve the problem and I am open to any ideas.
In short the problem:
I have a form that tracks "Containers" when they come to our yard.
A container may come and go many times or the course of time.
My user would like to enter the Container Number and have the form show him all of the Instances of that Container Number.
So I added a button on the form [Search] with this code:
Private Sub cmdSearch_Click()
Dim strSQL As String
Dim strName
strName = InputBox("Enter Container No to Find: ")
strSQL = "SELECT ContID FROM dbo_tblContainers " & _
" WHERE ContNo = '" & strName & "';"
Me!Filter = strSQL
Me!FilterOn = True
End Sub
I get an error:
Runtime error 2465 Can't find the field "Filter" referred to in your expression.
Debug drops me on the line : Me!Filer = strSQL
Will also need a way to easily remove the filter once they are done.
Thanks,
Chuck
In short the problem:
I have a form that tracks "Containers" when they come to our yard.
A container may come and go many times or the course of time.
My user would like to enter the Container Number and have the form show him all of the Instances of that Container Number.
So I added a button on the form [Search] with this code:
Private Sub cmdSearch_Click()
Dim strSQL As String
Dim strName
strName = InputBox("Enter Container No to Find: ")
strSQL = "SELECT ContID FROM dbo_tblContainers " & _
" WHERE ContNo = '" & strName & "';"
Me!Filter = strSQL
Me!FilterOn = True
End Sub
I get an error:
Runtime error 2465 Can't find the field "Filter" referred to in your expression.
Debug drops me on the line : Me!Filer = strSQL
Will also need a way to easily remove the filter once they are done.
Thanks,
Chuck