Hello everyone,
Hope everyone is having a good new year!
Anyway, i have this problem with my database.
my database is about searching an item using an unbound searchbox. whenever a user search for an item (key-in the keyterm in the searchbox), the listbox below the searchbox will enumerate or show the records from the keyterms that the users key-in. now, my question is, how to create a specific preview reporting with the searched keyterm used ONLY and not the whole records?
Example:
i will search Nokia phones then the listbox will show the records of all Nokia phones --- Nokia 6610, Nokia 3210, Nokia Lumia, Nokia E71, etc. Then i will click a preview report button to show me the Nokia phones only not included Samsung phones, Sony phones, or Blackberry phones (which are in the records also).
i used this code in the preview report button on the OnClick Event Property:
Private Sub Preview_Report_Search_Click()
On Error GoTo Err_Preview_Report_Search_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "QRY_subreport"
DoCmd.OpenReport stDocName, acPreview, , stLinkCriteria
Exit_Preview_Report_Search_Click:
Exit Sub
Err_Preview_Report_Search_Click:
MsgBox Err.Description
Resume Exit_Preview_Report_Search_Click
End Sub
BUT, that code will show me everything (Samsung, Sony, Nokia, Blackberry, etc.) and NOT Nokia phones only.
I hope someone can help me. if someone from here experienced this kind of problem, please share it to me the solution so i can move to my next task.
Thanks!