By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,503 Members | 2,730 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,503 IT Pros & Developers. It's quick & easy.

Open Microsoft Search

P: n/a
DD
Hi
I want to click a cmdButton that opens up the Microsoft Default Search
box, so a user can search their harddrive for files
Can anyone offer help on the code
Regards
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
In article <14**************************@posting.google.com >,
da**********@bigpond.com.au (DD) writes:
Hi
I want to click a cmdButton that opens up the Microsoft Default Search
box, so a user can search their harddrive for files
Can anyone offer help on the code
Regards


David

You can quite easily use the Windows File Open/Save dialog box. The code for
this is located at http://www.mvps.org/access/api/api0001.htm. Whilst this code
is quite complicated, you can just treat it as a "black box", by modifying the
sample function provided at the bottom of the page.

If you are after the proper File Search facility of Windows Explorer, then you
will need to do a bit of work. The code example below is based on code from
Randy Birch's VBnet at http://vbnet.mvps.org:

Private Const VK_ACTION = &H46
Private Const VK_LWIN = &H5B
Private Const KEYEVENTF_KEYUP = &H2
Private Declare Sub keybd_event Lib "user32" _
(ByVal bVk As Byte, _
ByVal bScan As Byte, _
ByVal dwFlags As Long, _
ByVal dwExtraInfo As Long)

Private Sub sFileSearch()
Call keybd_event(VK_LWIN, 0, 0, 0)
Call keybd_event(VK_ACTION, 0, 0, 0)
Call keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0)
End Sub
--

Jon

www.applecore99.com - Access Tips and Tricks

Nov 12 '05 #2

P: n/a
On 2 Jan 2004 18:31:29 -0800, da**********@bigpond.com.au (DD) wrote:

Look up the documentation on the ShellExecute function.
-Tom.

Hi
I want to click a cmdButton that opens up the Microsoft Default Search
box, so a user can search their harddrive for files
Can anyone offer help on the code
Regards


Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.