Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find Box Defaults in XP

Status
Not open for further replies.

gohike

Programmer
Jan 28, 2002
1
US
I have an application recently converted from v7. Now, when I call the Find Command (see below), I can't get it to default to search the entire form.

When I click the Search button, the Look In box is gray (w/ value of form name) but when I "Find" I get a message saying the current control can't be searched.

So, now my code looks like this:

DoCmd.GoToControl ("VendorNum") ' give field focus
SendKeys "%hs%e%ru%n", False ' set Find defaults
DoCmd.RunCommand acCmdFind ' run Find


The "SendKeys" line came from some postings I saw refering to Access 97 and below. It doesn't completely work in XP (everything except the "%e" - clear Search Only Current Field - seems to work).

With the GoToControl line, the field gets focus and the Look In box becomes available, but I don't want the default to be the field. I want the form.

Any ideas?

Thanks,
Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top