workaround to set "Search Fields as Formatted"

  • Thread starter Thread starter Gordon Prince, MCP
  • Start date Start date
G

Gordon Prince, MCP

I saw several posts in this newsgroup about Access 2002/2003 having the "Search Fields as Formatted" checkbox checked by default. But no one seemed to have a way to set it.

I tried this and it works.
Application.Echo False
DoCmd.OpenForm strStaff
DoCmd.FindRecord "StaffID='AP'", acStart, False, acSearchAll, False, acCurrent, True
DoCmd.Close acForm, strStaff, acSaveNo
Application.Echo True

It looks like setting any of these arguments once leaves them set as long as the application is open. The fifth argument to the FindRecord is "SearchAsFormatted". False clears the checkbox.

I added the code to my application's startup form's Open event.
 
See the MSDN article:

http://msdn.microsoft.com/library/en-us/dnacc2k/html/acglobaloptions.asp?

--
HTH
Van T. Dinh
MVP (Access)


I saw several posts in this newsgroup about Access 2002/2003 having the "Search Fields as Formatted" checkbox checked by default. But no one seemed to have a way to set it.

I tried this and it works.
Application.Echo False
DoCmd.OpenForm strStaff
DoCmd.FindRecord "StaffID='AP'", acStart, False, acSearchAll, False, acCurrent, True
DoCmd.Close acForm, strStaff, acSaveNo
Application.Echo True

It looks like setting any of these arguments once leaves them set as long as the application is open. The fifth argument to the FindRecord is "SearchAsFormatted". False clears the checkbox.

I added the code to my application's startup form's Open event.
 
Back
Top