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

raphael99

Registered User.
Local time
Yesterday, 20:40
Joined
Apr 6, 2015
Messages
126
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:

raphael99

Registered User.
Local time
Yesterday, 20:40
Joined
Apr 6, 2015
Messages
126
I attach example database View 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:

accessorater77

Registered User.
Local time
Yesterday, 20:40
Joined
May 26, 2016
Messages
13
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
 

cmray58

Registered User.
Local time
Yesterday, 20:40
Joined
Mar 24, 2014
Messages
70
Hello, what if I want to display the actual query? A list box doesn't allow the user to edit/add records
 

nutz104

New member
Local time
Today, 04:40
Joined
Aug 26, 2016
Messages
1
What about if the field you want to search has a mixture of numbers and letter? how would that affect the code?
 

Anonymous

New member
Local time
Today, 11:40
Joined
Feb 5, 2020
Messages
3
Sorry for noob question the underscore doesnt seems to fit in the code
 

jdraw

Super Moderator
Staff member
Local time
Yesterday, 23:40
Joined
Jan 23, 2006
Messages
15,379
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.
 

Anonymous

New member
Local time
Today, 11:40
Joined
Feb 5, 2020
Messages
3
Sir jdraw I followed the attachment code and it works no thank you for the response
 

Users who are viewing this thread

Top Bottom