Results 1 to 3 of 3
  1. #1
    smaier is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Jul 2020
    Posts
    43

    Invoke Windows search programmatically?

    Hello, all!



    What I have is a form which runs a query based on the value(s) in various textboxes and outputs the results into a listbox. What what would be pretty cool is if I could add a double-click event that would invoke a Windows (7, but mostly 10) search in a predetermined directory based on the stored value of the double-clicked row of the listbox.

    I am wanting this, rather than opening a specific file, because the absolute path to the file the user would want to open isn't always exactly the same. There may be one or two additional subdirectories in the path, or the file could be a .dxf, .dwg or .pdf.

    Is there a practical way of doing this? I am avoiding just going through all the directories and making their paths consistent because there are hundreds of tool numbers I would have to sift through.

    Any suggestions would be greatly appreciated!

  2. #2
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    You can use Dir function or other methods to search for a pattern (to ignore the extensions), have a look at the GetFiles sub towards the bottom of this post:

    https://stackoverflow.com/questions/...ple-subfolders

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #3
    smaier is offline Advanced Beginner
    Windows 10 Access 2010 64bit
    Join Date
    Jul 2020
    Posts
    43
    Fantastic lead, Gicu! Will work with that this evening.

    Thank you so much

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 06-02-2018, 05:11 PM
  2. Replies: 1
    Last Post: 08-13-2017, 11:39 AM
  3. Replies: 6
    Last Post: 08-08-2013, 01:00 PM
  4. How to query Windows Search 4.0??
    By dwcolt in forum Programming
    Replies: 0
    Last Post: 01-26-2012, 04:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums