Results 1 to 5 of 5
  1. #1
    Tammy is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2014
    Posts
    29

    Find and Replace in Formulas

    Hi All

    I've got a report that I run monthly and will need to add a month and delete the previous month. The formulas will need to be altered to add the new month. There are probably 30 formulas that will need to be altered. I wondering if anyone has encounted a way to find and replace in the design view of a report? I don't want to change the data in the database just the formulas. For example:

    This formula will need to be

    =IIf([PK Contract Type Description]="Pending",[AccessTotalsJan 15]*0.75,IIf([PK Contract Type Description]="Prospect",[AccessTotalsJan 15]*0.25,IIf([PK Contract Type Description]="Proposal",[AccessTotalsJan 15]*0.67,[AccessTotalsJan 15])))

    This formula

    =IIf([PK Contract Type Description]="Pending",[AccessTotalsFeb 15]*0.75,IIf([PK Contract Type Description]="Prospect",[AccessTotalsFeb 15]*0.25,IIf([PK Contract Type Description]="Proposal",[AccessTotalsFeb 15]*0.67,[AccessTotalsFeb 15])))

    Doing this manually on a monthly basis will be time consuming. Any way that I can do a find and replace in the formulas (find Jan replace with Feb)?

    Thanks in advance.



    Tammy

  2. #2
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    614
    The best option is to use a form with months in a combobox (and years in another ) and replace the month in the report's formula by Forms!YourFormName!YouComboBoxName.
    Select the month on form and run the report. Once set, you do not have to change the formula at all

  3. #3
    Tammy is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2014
    Posts
    29
    Thats interesting, Ill have to think about that. It may work but it may not.

    I would really like to see if there is a Find and Replace option.

    Tammy

  4. #4
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    614
    It may work but it may not.
    Are you using a table or query as record source for your report ?

  5. #5
    Tammy is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2014
    Posts
    29
    I'm using a query and its pretty complex. They wanted to see the months across the top and projects down the side. So each month I have to add a new month across the top and update all the sum formulas to pick up the new month.

    Tammy

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Find and Replace
    By dweekley in forum Queries
    Replies: 3
    Last Post: 04-12-2013, 07:16 AM
  2. find and replace
    By rohini in forum Access
    Replies: 7
    Last Post: 05-17-2012, 05:23 AM
  3. Find and Replace Within a Macro
    By bmschaeffer in forum Access
    Replies: 1
    Last Post: 12-20-2011, 11:27 AM
  4. Find and Replace
    By Bedsingar in forum Access
    Replies: 1
    Last Post: 08-14-2011, 01:10 PM
  5. Find and Replace Query
    By randolphoralph in forum Queries
    Replies: 4
    Last Post: 03-17-2010, 07:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums