Find And Replace version 2        (REPLACE2.MDA)

Summary:
  This program provides a "Find and Replace" function for Tables, Queries,
  Forms, Reports, Macros, and Modules (MSAccess 2.0 only provides Find and
  Replace for Modules).  I wrote this module to facilitate name changes
  since MSAccess provides such poor name change support.  In addition to
  facilitating name changes it has other uses (such as locating all
  occurrences of a given function call to enable you to change it).  The
  intended user of this module is a programmer.


To install and run Find and Replace:

  1 Move the replace2.mda file to your ACCESS directory (probably
    c:\ACCESS)

  2 Either use the Add-in manager to add FindAndReplace or manually install.

    Installing via Add-in manager:
      Select menu item "File" then sub-menu item "Add-ins" then choose
      "Add-in Manager".  Select library "Find And Replace" and click the
      "Install" button.

    Installing Manually:
      Using Microsoft Windows Notepad or another text editor, open
      MSACC20.INI (in your WINDOWS directory), and add the following
      lines under the sections indicated;
      add these section headings if they are not already present):

         [Libraries]
         replace2.mda=ro

         [Menu Add-ins]
         &Find and Replace==StartFindAndReplace()

         [Property Wizards]
         FARNameBuilder=Name,Smart Rename,zFAR_RenameControl,rw

      Save the file.

  3 Restart Microsoft Access.

  4 Open the database you want to use Find and Replace with.

  5 Find and Replace now appears as a choice on the File menu under the
    Add-ins submenu.  Select it.  The Find and Replace form should appear.

  6 Enter the text to be searched for and the text that will replace it.
    WildCards are not permitted.

  7 If you want to restrict the search to Match Whole Words only (words
    consist of A-Z, a-z, _, 0-9) check the "Match Whole Words/Names Only"
    box.  If you want to search only objects (objects are forms,
    tables,...) with a certain name enter that in the "Object Names Like"
    box (wildcards OK).  If you want Find and Replace to try to capitalize
    things properly check "Clean-up to Proper Case" (It will look on both
    sides of the found string, to the beginning and end of the word
    containing the found string, to perform this; it will not capitalize
    lower case prefixes as defined by the Leszynski/Reddick naming
    standard; it will not change upper case to lower case).  The
    proper-case cleanup is usually only useful when the original names
    have spaces or underscores ('_') separating words (within a name)
    needing capitalization.

  8 Choose the object types in which you want to search (Table, Query,
    Macro, Form, Report, or Module); push the appropriate toggle buttons
    to.  select any combination of these.  If you want to search only
    objects with a certain name enter that (wildcards OK) in the "Object
    Names Like" box next to the desired object type toggle button.  Push
    the "Find" button to start the search. For Form and Report searches
    you can specify via the check boxes what properties to search.

  9 Assuming you haven't checked the "Replace Without Asking" box, when a
    match is found a message box is displayed.  The object and property in
    which the match was found is indicated at the top of the box.  Just
    underneath that, the current value of the property is displayed.  The
    line after that shows what the value will be changed to.  At the
    bottom are five buttons: Edit Changes, Yes, Yes to All, No, and
    Cancel. You can select "Yes" to do the replacement, "No" to proceed to
    the next match, or "Cancel" to stop the entire process.  Edit Changes
    allows you to make additional changes.  Yes to All does the
    replacement and does all further replacements without asking (as if
    you had selected "Replace without Asking").


Control Name Change Builder

To access the control name change builder:  Open Form or report in design
mode.  Open properties display.  Select the control you want to change the
name of.  Select the control name item in the properties boc.  Click the
...  button to the right of this entry to invoke the control name change
builder.  This allows you to change the control name and all associated
CBF Event procedure names.


Notes:
   1) FIND AND REPLACE CAN BE A DANGEROUS TOOL.  IF YOU'RE NOT SURE WHAT
      YOU'RE DOING, DON'T DO IT.  Even if you think you know what you're
      doing, always have a backup copy of your database that is relatively
      up to date.

   2) SendKeys is used for the search in modules.  For English versions of
      Access: if alt-e has been redefined then the Find in All modules
      function won't work.  International versions of Access:  if the
      international version isn't yet supported the Find in All Modules
      button will be disabled and the find in code-behind-forms will be
      disabled.  I will gladly add support for your international version
      after you provide me with the necessary information.

   3) The Match Whole Word only option behaves slightly different than you
      would expect in modules.  This is a feature of the Access Find
      function.  For example, in modules, a whole word match search for
      the find string "vendor" will not produce a match for vendor% (or
      vendor$,...).  However, a match will be found for "vendor_zipcode".
      With Find and Replace's Match Whole Word/Name option (which is used
      for everything but modules) vendor% produces a match, but
      vendor_zipcode does not (this behavior is more desirable when
      attempting to change names).

   4) For bug reports or suggestions contact:
                 Rick Fisher, CompuServe ID 70743,2514



What Find and Replace searches:

  Tables: Local Tables -Table Names, Field Names, ValidationRules and
          ValidationText, Captions, Descriptions.
          Attached Tables - Table Names, captions, connect strings (if the
          connect string is changed the link will be refreshed).

  Queries:  The query name and the query SQL (which completely specifies
            the query.

  Forms:  Properties that can specify macros, functions, field names,
          control names, or table/query names.  Other properties:
          Caption, Tag, Validation Text.  Other: form names,
          code-behind-forms.

  Reports: Properties that can specify macros, functions, field names,
           control names, or table/query names.
           Other properties: Caption, Tag.
           Other: report names, code-behind-reports.

  Macros:  Macro Names, Macro Labels, Conditions, and Parameters to Macro
           Actions.

  Modules: The module search invokes the Microsoft search function for
           modules.  The limitations of MSAccess apply here.


Version Information:

  ver 1.00   8/18/93  Initial Version for MS Access 1.1
  ver 1.01   8/18/93
  ver 1.02   8/24/93
  ver 1.03   9/09/93
  ver 1.04   9/20/93
  ver 1.05  10/21/93

  ver 2.00   7/05/94  Initial Version for MS Access 2.0
  ver 2.01   7/08/94  Fixed Invalid Operation error message in form
                      search (search was done correctly though).
                      Enhanced Macro search: searches comments, improved
                      macro name changing.  Added a "Yes to All" option.
  ver 2.01B  7/15/94  Beta for German Language support.
  ver 2.02   8/03/94  If a control name is changed, the Event procedures
                      now get renamed properly no matter what the length
                      of the control name (note: the control name portion
                      of an event procedure name is truncated by Access if
                      the control name is long).
                      Added Name Change Builder for the Name property in
                      the properties box to let Find and Replace do the
                      name change.
                      Substantial improvement in module search.  No longer
                      searches all loaded modules.  Will limit search to
                      Object Like specification.  No longer leaves modules
                      open.  User response only required for modules where
                      a match is found.  Includes other module search bug
                      fixes.
                      Interface change: Now can select multiple object
                      types (Tables, Forms,...) and search them in one
                      operation.
                      German Language version support added.
                      Miscellaneous changes to support foreign versions.
  ver 2.03   8/08/94  Fixed bug that left Setwarnings off after form and
                      report searches.  Added CIS Registration info.


Copyrights, Warranty, License Agreement:

  Find and Replace Software, Copyright 1993, 1994  Rick Fisher, All Rights
  Reserved


  DISCLAIMER OF WARRANTY

        THIS SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" AND WITHOUT
        WARRANTIES AS TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER
        WARRANTIES WHETHER EXPRESSED OR IMPLIED.  BECAUSE OF THE VARIOUS
        HARDWARE AND SOFTWARE ENVIRONMENTS INTO WHICH THIS PROGRAM MAY BE
        PUT, NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED.
        GOOD DATA PROCESSING PROCEDURE DICTATES THAT ANY PROGRAM BE
        THOROUGHLY TESTED WITH NON-CRITICAL DATA BEFORE RELYING ON IT.
        ALSO, PRIOR TO THE USE OF THIS SOFTWARE WITH ANY DATA, A COMPLETE
        BACKUP OF THE DATA SHOULD BE MADE (AND RETAINED UNTIL IT IS
        DETERMINED THAT THE RESULT OF THE MODIFICATIONS BY THIS SOFTWARE
        HAVE HAD NO UNDESIRED EFFECTS). THE USER MUST ASSUME THE ENTIRE
        RISK OF USING THE PROGRAM.  ANY LIABILITY OF THE SELLER WILL BE
        LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT OR REFUND OF PURCHASE
        PRICE.

 LICENSE AGREEMENT
    You should carefully read the following terms and conditions before
    using the software.

    Unregistered Version:

       You are hereby licensed to  1) use the unregistered shareware
       version of the software for a 30 day evaluation period,  2) make as
       many copies of the unregistered shareware version of this software
       as you wish, 3) give exact copies of the unregistered shareware
       version of this software to anyone, and 4) distribute the Shareware
       version in its unmodified form via electronic means.

       You are specifically prohibited from charging, or requesting
       donations, for any such copies, however made, and from distributing
       the software with other products (commercial or otherwise) without
       prior written permission, with one exception: Disk Vendors approved
       by the Association of Shareware Professionals are permitted to
       redistribute the software, subject to the conditions in this
       license, without specific written permission.

    Evaluation and Registration:
       This is not free software.  You may not use this software beyond
       the initial 30 day evaluation period unless you register the
       software .  The price to register version 2.0 of this software is
       $15 per copy.  Payment must be in US dollars and should be sent to
       Rick Fisher, 22 Peninsula Rd., Belvedere, CA 94920. Include your
       name, company name, and address with your registration fee.
       Alternatively, you may pay and register via Compuserve (charges
       appear on your Compuserve bill).  GO SWREG on Compuserve to
       register via Compuserve; the registration ID for this program is
       3186.  When payment is received you will be sent a registration
       number which can be recorded in the software via the software's
       registration screen.

       One registered copy of this software may either be used by a single
       person who uses the software personally on one or more computers,
       or installed on a single workstation used non-simultaneously by
       multiple people, but not both.

       You may access the registered version through a network, provided
       that you have obtained individual licenses for the software
       covering all workstations that will access the software through the
       network.



Rick Fisher, CompuServe ID 70743,2514.

                                                 (Replace2.txt 8/08/94)
