+ Reply to Thread
Results 1 to 5 of 5

Report - code builder

  1. #1
    Registered User
    Join Date
    04-18-2011
    Location
    Bucharest, Romania
    MS-Off Ver
    Excel 2019
    Posts
    90

    Report - code builder

    Hi to all,

    what is the code equivalent for

    if ([FieldA] < [StartDate]) then
    [FieldB].value=0
    end if

    [StarDate] is a Date parameter which i entered when the report is created
    [FieldA] is a Date field
    [FieldB] is a Number field

    i want to insert this in the code builder to run before the report is created, so that it changes the results showed

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Report - code builder

    Can you explain more fully?

    What's Code Builder?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    04-18-2011
    Location
    Bucharest, Romania
    MS-Off Ver
    Excel 2019
    Posts
    90

    Re: Report - code builder

    in Design View for a Report u can select to biuld an event an have 3 options:

    Macro Builder
    Expression
    Code Builder

    Code Builder looks like VBE and if this would have been Excel i would know where to start from, but being access ...

  4. #4
    Registered User
    Join Date
    04-18-2011
    Location
    Bucharest, Romania
    MS-Off Ver
    Excel 2019
    Posts
    90

    Re: Report - code builder

    Here's a .jpg to help explain my problem better

    the Report is supposed to show the Total Income for the period entered. My problem is with the Addendum (Act aditional in the report), since it's linked to the Contract and i need to show the contract info for that addendum, but i also have to show contracts info.

    The problems appears with addendum for 2012 which have a contract done in 2011, because the info from 2011 appears in the report and affect the sums.

    That is why i was trying to resolve this by code.
    Attached Images Attached Images

  5. #5
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: Report - code builder

    Can you post a sample database showing how it is now and how you expect it to look? Please make it compatible with Access 03.
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1