Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    lbcarvalho is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jul 2018
    Posts
    31

    DB uploaded to this website again (?)


    SYS_INVOICE_Copy.zip

    Not sure if I did it right the first time so here it is again.

  2. #17
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Opened report and everything calculates properly.
    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
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Quote Originally Posted by June7 View Post
    Opened report and everything calculates properly.
    That surprises me! Texto15 & Texto17 are fine but Texto19 is blank.
    That's partly due to the table name being mistyped in the expression as 'Limiteitau' instead of 'Limiteltau'
    When corrected I get #Error

    This is a simpler expression and should work but I also got #error for this
    Code:
    =DLookUp("ValueOfLimit","Limiteltau","LimitID = " & [Texto19])
    Note that I renamed the Codrigo(?) field as LimitID to avoid issues with accented characters on my tablet.
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  4. #19
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Okay, weird. Just opened report again to double check and all 3 textboxes show calculated value, no errors. I did nothing to the expressions.
    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
    RagJose is offline Seasoned user
    Windows 7 64bit Access 2016
    Join Date
    Apr 2012
    Location
    Brazil
    Posts
    42
    Lincoln,


    first of all, if I understood what you're after, you'll still have to insert the fields you want to see listed into the Detail section of your report.
    These fields must come from query "PmtsViaItau", which you declared as the RecordSource for the report.
    And your report will only show content when you have Itaś payments more recent than the latest [DateOfLimit] in LimiteItau, which is not the case with the sample data you uploaded.


    About the problem you are having:
    The Header of your report shows as Texto15 the latest date appearing as [DateOfLimit] in table LimiteItau , and as Texto19 the last value for [Código] in the same table (please note that these two textboxes do not conceptually refer to the same record in LimiteItau). Both textboxes function as expected.

    The other (big) textbox seems intended to show the value corresponding to the latest [DateOfLimit], but it showed up blank as I opened the DB after download (same as for you and for isladogs earlier today).
    I can't explain that. The syntax june7 provided is correct (upper or lowercase don't matter for table or field names, at least in Windowsland), and I did succeed in having it show a value by just playing with the dates in LimiteItau. Weird -- it seems to function as expected only when I make the second LimiteItau record the one with the latest date. Another Access bug?!?

    Now for a suggested solution, assuming the records in LimiteItau will always be in strictly ascending date order (if not, sorry, couldn't devise another workaround that doesn't use code):
    Substitute
    DLast("DateOfLimit","LimiteItau") and
    DLast("ValueOfLimit", "LimiteItau")
    as the ControlSource for the two main textboxes in your report header. I think you don't really need the [Código] textbox. Try it and let us know.

    Additional advices:
    [PmtReceived] seems to be expressed either in EUR or in USD. You'll want to use [GrossPmtReal] as a criterion instead, to avoid fake results in your report.
    Also, you should normalize your DB, replacing the applicable text fields in "Pmt RECEIVED" and "TRABALHOS" by pointer fields to CLIENTES and tblPayBank. The Analyze Table tool (Database tools tab) can assist you in that.
    Last edited by RagJose; 05-13-2019 at 06:11 AM.

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

Similar Threads

  1. Replies: 3
    Last Post: 03-17-2017, 08:52 AM
  2. Replies: 1
    Last Post: 11-16-2014, 09:10 AM
  3. Sub Report table which has Date only
    By raffi in forum Access
    Replies: 3
    Last Post: 03-26-2014, 05:59 PM
  4. How create a table for a date range report
    By jegupta in forum Programming
    Replies: 12
    Last Post: 01-30-2014, 12:33 PM
  5. Link report date with a table field
    By lizzywu in forum Reports
    Replies: 16
    Last Post: 10-27-2011, 09:51 AM

Tags for this Thread

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