Results 1 to 5 of 5
  1. #1
    spyldbrat is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2015
    Posts
    73

    Display Text Based on Field Value

    I am VERY BEGINNER user of access, so please try not to use too many technical words with me LOL!

    I am trying to create a report. The report is based on our Customer Aging which displays all open invoices (INV #), the balance due on each invoice (BAL DUE) and days each invoice has aged (DAYS AGING). I wondering if I can add text to the top of each Customer Grouping I set up based off the highest number that appears in Days Aging column. I would like set multiple text options based on the numbers. I am not going to provide the exact wording the text because I am pretty sure I can modify the text after I am provided the information on how to do it. But, below is an example.



    TEXT EXAMPLES:
    Text 1 for 30 to 45 days: You have $xxxx overdue between 30 and 45 days. Please remit.
    Text 2 for 46 to 55 days: You have $xxxx overdue between 46 and 55 days. Please remit.
    The $xxxxx amount would come the the column called "Bal Due" for the corresponding days.

    EXAMPLES:
    Customer has 10 invoices all aged between 1 and 27 days: Will not display on report
    Customer has 15 invoices all aged between 2 and 42 days: Display Text 1 at the top of the report
    Customer has 7 invoices all aged between 3 and 46 days: Display Text 2 at top of the report

    I hope you can help!!! Thank you.

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850
    spyldbrat,
    I suggest you post a copy of the database with enough data to illustrate the current issue.

    You should be aware that Access does not like/work well with field/object names with embedded spaces or special characters. Yes it will accept them under certain syntax requirements, but they will eventually come back to haunt you.

    It will be easier for readers to offer focused responses once they can see you efforts and data in context.

    Good luck with your project.

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,648
    More than 1 way to accomplish.

    1. Calculate an AgeGrp in query then reference that field in report textbox with expression for conditional Count() and determine which message to display.

    2. If gets too complicated to do with expressions in textboxes, build VBA custom function
    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.

  4. #4
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,372
    Maybe a calculated textbox on report (as long as it or the query behind it contains the fields required) like:

    ="You have $" & [Bal Due] & " overdue between " & Min([Days Aging]) & " and " & Max([Days Aging]) & " days. Please remit."
    Since you will be able to modify it accordingly, you'll have to incorporate the correct references to get the values over a group. I presume your query has that covered.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    spyldbrat is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Jul 2015
    Posts
    73
    Thank you everyone. I will play with it and see what I come up with.

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

Similar Threads

  1. Text box to display value based on a query
    By ittechguy in forum Forms
    Replies: 4
    Last Post: 10-07-2015, 06:08 AM
  2. Replies: 9
    Last Post: 04-18-2014, 08:51 PM
  3. Replies: 1
    Last Post: 03-27-2014, 06:42 AM
  4. Display field as text box
    By thekruser in forum Forms
    Replies: 5
    Last Post: 08-31-2010, 10:37 AM
  5. Replies: 2
    Last Post: 05-05-2010, 02:52 PM

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