Results 1 to 15 of 15
  1. #1
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Burgas, Bulgaria
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Subreport (Access 2000)

    How can i refer to a control in the subreport? I want to substract from the control in the main form from the control in the subreport and use this value as the net profit in the main report.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Subreport (Access 2000)

    Try

    =[rptOls]![Amount Grand Total Sum]

    to refer to the Amount Grand Total Sum text box on the subreport. Since you haven't included the relevant tables, queries and forms, it is impossible for me to test it.

  3. #3
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Burgas, Bulgaria
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Subreport (Access 2000)

    Thank you Hans it works ! How can i make the substraction ?
    to write = Me!text37 - Me![text42]
    or to write :
    =Sum([Delta])- =[rptOls]![Amount Grand Total Sum]
    The first function is in the control 37 and the second function in the control 42

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Subreport (Access 2000)

    You shouldn't repeat the = inside an expression.
    <code>
    =Sum([Delta])-[rptOls]![Amount Grand Total Sum]
    </code>
    should display the difference.

  5. #5
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Burgas, Bulgaria
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Subreport (Access 2000)

    Dear Hans,

    I have a database made with your help. Somehow the subreport is not coordinated with the commands from the form and show one and the same result.
    I cannot see the reason for that.Unfortunately I had to strip the tables from their content since I couldn

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Subreport (Access 2000)

    The Record Source property of rptGain is blank, so it won't do anything.

    Please post a version of the database with at least a few valid records. You cannot expect us to do data entry in order to answer your questions.

  7. #7
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Burgas, Bulgaria
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Subreport (Access 2000)

    I succeded to strip down my database in a presentable order.I do hope that this attachement will do.Thank you

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Subreport (Access 2000)

    Both customers in your table have the same afid, so there is nothing to test. If you want us to help you, please make it possible by providing relevant and sufficient information.

  9. #9
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Burgas, Bulgaria
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Subreport (Access 2000)

    I am really sorry. Sending again the revised version hope i am ok now.Ineed also to get an overall review for the year, suming all the offices and all the months will it be attained without licking the buttons ?

    Thank you in advance

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Subreport (Access 2000)

    Sorry, I give up. Your tables still don't allow any relevant testing (all orders are for afid = 1 and for the month November).

    I doubt whether your users would like to lick buttons. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

  11. #11
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Burgas, Bulgaria
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Subreport (Access 2000)

    You are right actually to make fun of me since i again missed to put the customer with afid 2. I coulnd send the full database and on stripping it i made these mistakes. Since i have done some orders only for novemberr, i delibertely deleted the remaining months in order for you to click only november, and then to choose between only two affiliates. I have put some now for october too.Otherwise the full datbase is with the complete months and affiliates.

    kind regards

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Subreport (Access 2000)

    The subreport now shows different results depending on whether the first or second affiliate is selected. So what exactly is the problem?

  13. #13
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Burgas, Bulgaria
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Subreport (Access 2000)

    Thank you Hans ! The problem is with the subreport that does not corespond with the choices.
    For example the outlays for the affiliates are as follows
    November :
    First affiliate 44555
    Second Affiliate 344
    total for November : 45899

    October :
    First affiliate 3444
    Second Affiliate 66666
    total for Octoberr : 70110

    I cannot coordinate the results in the subreport with the result in the main report. I am very grateful for your support

    Kind regards

  14. #14
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Subreport (Access 2000)

    You'll have to link the subreport on the month as well as on the affiliate. I have modified qryols and the record source of rptGain to add a field named M that calculates the month. I have added M to the Link Master Fields and Link Child Fields property of the subreport on rtpGain. See attachment.

  15. #15
    3 Star Lounger
    Join Date
    Feb 2004
    Location
    Burgas, Bulgaria
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Subreport (Access 2000)

    Dear Hans

    You are wonderful ! I simply cannot find words to thank you. Of course it works, everything ! So grateful !

Posting Permissions

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