We rely heavily on autosaves, yet huge chunks of progress and entire versions of documents can be lost when we don’t manually save our work.
Whether your work was accidentally deleted, lost in a Microsoft Word crash, or simply disappeared, here’s a simple guide on how to recover unsaved Word documents. (Naturally, this suppresses the highlighting, but only on the current record.Fortunately, there are dependable ways to recover Word documents quickly and reliably. And just in case the user clicks on it, we use its Enter event to SetFocus to the text box bound to the real field. The AfterUpdate event of txtSearchText applies/removes the form's Filter, and shows/hides txtSearchDisplay with the right ControlSource.įinally, we set the TabStop property of txtSearchDisplay to No, so it does not receive focus as the user tabs through the form.
The AfterUpdate event of cboField repositions txtSearchDisplay over the top of the chosen field (by setting its Top and Left properties.) At design time, we used Bring To Front (on the Arrange tab of the Form Design Tools ribbon) so it sits in front of the other controls. The expression ends up as: =IIf( Is Null, Null, Replace(, "ar", "ar")) And for demonstration purposes, we used a red font tag instead of bold. In practice, Replace() cannot cope with Nulls, so we must test for Null. Since its TextFormat property is Rich Text, Access 2007 knows what to do with the HTML tag.įor the example above where we searched the CompanyName field for the characters "AR", the ControlSource will become: =Replace(, "ar", "ar")) The idea is to include an HTML tag in set the ControlSource of txtSearchDisplay to highlight the search characters.
(The code assumes the controls and fields have the same name.)
When you press Enter, the form filters to those records where the characters are found in the field, and displays a text box showing the matching characters in red. Type the characters to match in the text box.You can in Access 2007, as text boxes can display rich text.ĭownload the sample database (ACCDB, 41kb zipped.) Search form, with matching characters highlighted in red Highlight matchesĬan you create a form where search results are highlighted within the text box?