Help Calculating a value on a Report

Posted on 2013-09-02
Medium Priority
Last Modified: 2013-09-18
So I have a query that results in the attached.

I want to create a report that included a Unbound Text Box (Due Date) that will Calculate:

Service ID        Due Date
IME                  Due date will be 7 calendar days from the Date of IME (it will be blank if   [/qu   no                    IME date has been entered yet)
RR                  Due date will be 10 calendar days from the Date the RR_Doctor letter is created.
ERR                Due Date will be 7 calendar days from the date the RR_Doctor letter is created.

Any help
Question by:seamus9909
LVL 17

Expert Comment

by:Kent Dyer
ID: 39459034
Wait..  You say Calendar Days..  I think you also want work days..  Most folks in the business world only want Monday through Friday.  Correct?


Author Comment

ID: 39459115
I have attached a sanitized version.

No they want Calendar days
LVL 50

Accepted Solution

Dale Fye earned 2000 total points
ID: 39502153
Your [ServiceID] field in the spreadsheet does not contain the same values as you indicate above.  Generally, I would not use an unbound textbox in your report, I would create a query as the RecordSource for the report and would create a computed column in the query, something like:

DueDate:Switch([ServiceID] = "IME", IIF(ISNULL([Date of IME]), NULL, DateAdd("d", 7, [Date of IME])), [ServiceID] = "RR", DateAdd("d", 10, [LastOfDateCreated]), [ServiceID] = "ERR", DateAdd("d", 7, [LastOfDateCreated]), True, "Unknown")

This assumes that the "Date the RR_Doctor letter is created" you mentioned in your original post is the [LastOfDateCreated] field in your spreadsheet.

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
A quick solution showing how to control and open a POS Cash Register Drawer using VBA with MS Access.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question