I have made a test form with at textbox for my search criteria AND a button to execute the search - simple and easy, and it shows me a explorer window with the search results.
Try yourself with this simple code behind the button:
Dim WhatToSearchFor As String
Dim WhereToSearch As String
WhatToSearchFor = Chr(34) & txtSearchFor.Value & Chr(34)
WhereToSearch = Environ("SlægtHovedmappe")
Shell "explorer.exe " & Chr(34) & "search-ms:query=" & WhatToSearchFor & "&crumb=location:" & WhereToSearch & Chr(34), vbNormalFocus
It you want to search for FRASES (in my danish version) you HAVE to use double qoutation marks around the frase, like this: "I look for this frase in my documents"
The search is very, VERY fast and it looks into doc, docx, PDF, msg ... you name it, in all subfolders - I think it's a very powerfull method !
BUT ...
I need to get the search result BACK to the Access form in a listbox ... BUT HOW ?