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.
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.