Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 31
  1. #16
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664


    Code:
    A subform/subreport is created by placing a subform/subreport container control on a form/report. The container has a SourceObject property. This can reference a table, query, form, report. The container has Master/Child Links properties that will synchronize related records from main form and SourceObject.
    Do you have a link for this that elaborates on this topic?


    Respectfully,



    Lou Reed

  2. #17
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #18
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664

    I cannot find the problem with Internet Use on the main form

    Here is my current version of Ceil Inn4.accdb. Everything is fine except for the calculation of
    Internet Use on the main form.

    That error also affects Net Pay calculation below it, because whatever is calculated in Internet Use is used in
    the Net Pay.

    I have attached the compacted Ceil Inn4. I cannot find the error in the calculation of Internet Use.

    Any help is appreciated. Thanks in advance.

    Respectfully,


    Lou Reed
    Attached Files Attached Files

  4. #19
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    Name of textbox on subform is: txtsbfTotalInternetFee

    The expression in textbox on main form is: =[sbfCustomerRoomUse].[Form]![txtTotalInternetFee]

    Note that sbf in the textbox name is not in the expression reference. Fix the expression reference: =[sbfCustomerRoomUse].[Form]![txtsbfTotalInternetFee]

    Then the names of textboxes on main form are: txtPhoneUse, txtRateTotal, txtInternetUse, txtNetPay

    The expression in txtNetPay: =Nz([txtPhoneUse])+Nz([txTotaltInternetFee])+Nz([txtRateTotal])

    The expression in txtNetPay should be: =Nz([txtPhoneUse])+Nz([txtInternetUse])+Nz([txtRateTotal])

    Access intellisense popups should help build expression with correct references as you type the expression.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #20
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    Now wait a second. I am not that bad. I knew about and corrected these errors. There should have not been an sbf anywhere. I gave that up.

    Also, I know that calculation for txtNetPay should not have a Total in it anywhere at all.

    I know that I changed these. It just that sometimes they appear to not remain changed. I cannot explain that.

    Yes , I periodically save everything.

    What is going on?

    R,


    Lou Reed

  6. #21
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    Don't know, but that's the db you posted. I made those edits and saved the form and it works.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #22
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    Okay, I see the situation more clearly.

    When you say textbox on subform is : txtsbfTotalInternetFee you are speaking about the textbox in the Form footer below the detail section. I am not sure why there are two textbox for internet charges, but there are. It seems redundant.

    But that is where the textbox with the sbf in the title resides in the form footer textbox. Now I see what you are speaking about.

    There is something very confusing here. These textboxes are on the detail section and in the form footer. Please note there is a subform textbox in the detail section with
    the same parameters. Of course, the exact same parameters cannot be used. The would send up and error.

    Could this tutorial again be in error?


    Thanks in advance.

    Respectfully,

    Lou Reed

  8. #23
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    The textboxes in the subform Detail section should just be bound to the fields, not have Sum() expressions. Earlier posted versions of db did this correctly. You edited the Detail section textboxes instead of the Footer textboxes.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #24
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    I have written as =RateApplied,
    =PhoneUse and
    =InternetFee.

    Is this correct?

    Should I leave out the = sign in each text box?

    Thanks in advance.


    Respectfully,


    Lou Reed

  10. #25
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    Do not use = sign when binding to field.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #26
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    I am including the modified database. It still is not outputting two
    values in the textboxes. They are for Phone Use, which outputs a blank
    screen, and InternetUse, which outputs #Error.

    I have checked the preceding calculations and have not found the error.

    I hope that someone else can.

    Also, when I put in the boxes at the bottom of the subform say InternetFee, MS Access 2010 adds
    the =[] around it When I go back and check it all I see is "=[InternetFee]". So it is done for me.

    I believe the final value Net Pay will be out when these two textboxes are fixed.

    Any help appreciated. Thanks in advance.

    Respectfully,


    Lou Reed
    Attached Files Attached Files

  12. #27
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    Okay, I got Internet Use to print out. That one was easy. I just selected
    fixed for format and it worked.

    Now if just can get Phone Use to display.

    Thanks in advance.

    Respectfully,


    Lou reed

  13. #28
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    The expression on main form is: =[sbfCustomerRoomUse].[Form]![txtTotalPhoneUse]

    Again, textbox in subform Footer is named: txtPhoneUse. Textboxes in subform Detail section are named: txtTotalPhoneUse, txtTotalInternetFee

    These names are on wrong textboxes.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  14. #29
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    Okay, I will try it. I think that you are right. It just seems things would be easier if we
    had all variable defined and listed like when you run a c or Fortran program.

    Thanks very much.

    Respectfully,

    Lou Reed

  15. #30
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    Not sure what naming controls has to do with defining variables in a program.

    Access does have intellisense popup tips as you type expression. Aren't you seeing them? There is also the expression builder dialog (which I actually never use).
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Page 2 of 3 FirstFirst 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 8
    Last Post: 03-13-2013, 08:32 AM
  2. Replies: 7
    Last Post: 12-28-2011, 02:05 PM
  3. Form/Subform Calculations
    By sidewayzalex in forum Forms
    Replies: 0
    Last Post: 08-15-2011, 01:11 PM
  4. subform calculations
    By genesis in forum Forms
    Replies: 0
    Last Post: 12-03-2009, 07:18 PM
  5. Subform calculations
    By foureyes in forum Forms
    Replies: 4
    Last Post: 07-27-2009, 08:20 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