Instant Search Box In Access Form (Search Function in Navigation Bar)

Hi
I have search function from Big Booty
http://www.access-programmers.co.uk/forums/showthread.php?t=188663

and it is working very well on a form. Troubles starts when I add the form to navigation bar.
A pop alert says "enter parameter value"
Code:
FRM!FRM_SearchMulti!SchrText
And the same pop allert rise each time I'm typing
How can I solve?
 
Last edited:
I attach example databaseView attachment Database2.accdb

After further investigation I noticed that also the query has the same pop when I load it.
Tried to build a new database but the error is still there
 
Last edited:
I keep getting the same error when I type "i" in the search box. I know this thread is 3 years old, but did anyone ever figure out the solution to this problem?

@JohnBigBooty
Your code is working really well, but I am now getting an error message, whenever I type the letter "i" in my search box. It's very weird. It may have always done that, I haven't used this search box very thoroughly so I'm not sure if its a new problem or it was there from the start.
Have you encountered this before?
It's a runtime 2112 error, and the debugger takes me here (in bold):

'Set the focus on the first item in the list box:

Me.SearchResults = Me.SearchResults.ItemData(1)
Me.SearchResults.SetFocus


'Requery the form to refresh the content of any unbound text box that might be feeding off the record source of the List Box
DoCmd.Requery


'Returns the cursor to the the end of the text in Text Box SearchFor
Me.SearchFor.SetFocus


If Not IsNull(Len(Me.SearchFor)) Then
Me.SearchFor.SelStart = Len(Me.SearchFor)
End If
End Sub


Private Sub SearchFor_GotFocus()

End Sub

Private Sub SearchResults_DblClick(Cancel As Integer)
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmDirectoryView"

stLinkCriteria = "[ContactID]=" & Me![SearchResults]
DoCmd.OpenForm stDocName, , , stLinkCriteria

End Sub

Private Sub Text19_DblClick(Cancel As Integer)

Me.SearchFor.Value = ""

End Sub
 
Hello, what if I want to display the actual query? A list box doesn't allow the user to edit/add records
 
What about if the field you want to search has a mixture of numbers and letter? how would that affect the code?
 
Sorry for noob question the underscore doesnt seems to fit in the code
 
Anonymous,
You have joined a thread that is several years old. Are you asking a question about the functionality of the search mentioned, or have you been using the search and have a specific issue? Any detail you can provide will help get focused responses.
Good luck.
 
Sir jdraw I followed the attachment code and it works no thank you for the response
 

Users who are viewing this thread

Back
Top Bottom