473,503 Members | 13,028 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access Reports Date If then Calculation

2 New Member
On a monthly report, I am trying to flag the projects where the status has changed from the previous month by placing a * next to the status. I have tried the following in a text box:

=IIf(DateDiff("d",[SPECIAL ASSESSMENT DISTRICTS]![DateModified],Date())<31,"*"," ")


I am calculating the difference in dates between the current date and the date the record was last modified. If less than 31 days, return the *. If greater than 31 days, return nothing. However, I keep getting an #Err in the print preview of the report.

Any suggestions are welcome.
Sep 6 '07 #1
3 1952
Rabbit
12,516 Recognized Expert Moderator MVP
What's [SPECIAL ASSESSMENT DISTRICTS]? Access will have no idea what this is. If it's on the report then you don't need it. If it's on a different object then you need [Forms or Reports]!SPECIAL ASSESSMENT DISTRICTS]![DateModified].
Sep 6 '07 #2
jobrien
2 New Member
What's [SPECIAL ASSESSMENT DISTRICTS]? Access will have no idea what this is. If it's on the report then you don't need it. If it's on a different object then you need [Forms or Reports]!SPECIAL ASSESSMENT DISTRICTS]![DateModified].
[Special Assessment Districts] is the name of the table under which Date Modified is stored. should I reference it from the form from where it would have been entered?
Sep 7 '07 #3
Rabbit
12,516 Recognized Expert Moderator MVP
[Special Assessment Districts] is the name of the table under which Date Modified is stored. should I reference it from the form from where it would have been entered?
You can't reference anything that's closed using that method. You can't reference tables and queries at all using that method. You can use the D functions, DLookup in particular. However, it seems like you should be including date modified in the query that the report is based on; that way you won't need to reference anything. You can pull it directly from the report's record source.
Sep 7 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
2714
by: Michael Bulatovich | last post by:
I have a very simple db I use for keeping track of hours, tasks, projects, clients etc. It has a form that I use to enter data. Currently the form has a textbox for a field called "start time",...
4
2531
by: JMCN | last post by:
object invalid or no longer set - confusion of the recordset in access 2003. i am currently converting from access 97 to access 2003. majority of the codes converted over perfectly fine, though...
16
48826
by: cyranoVR | last post by:
This is the approach I used to automate printing of Microsoft Access reports to PDF format i.e. unattended and without annoying "Save As..." dialogs, and - more importantly - without having to use...
6
3823
by: migueltxa | last post by:
Hi all, I have a problem with some calculations in MS Access 2003. I have 3 fields (Qty, Price and VolumeUSD) in a form and the following formula: VolumeUSD = Qty * Price. Qty and VolumeUSD...
3
8056
by: audleman | last post by:
I've been programming in Filemaker and am used to having a field type called Calculation. An example of a calculation: In a school registration database I have a date field corresponding to the...
6
3648
by: Bob Alston | last post by:
I am looking for Access reporting add-in that would be easy to use by end users. My key focus is on selection criteria. I am very happy with the Access report writer capabilities. As far as...
13
3872
by: salad | last post by:
Hi Guys: I was stuck. I needed to send a report to a file. My beautiful report(s) in Access were going to require loss of formatting with RTFs, a PITA in WordMailMerge, sending it as a text...
4
1904
by: The Facilitator | last post by:
Well, Outlook seems to be making my life more and more challenging. Categories are added in one field and are delimmited via comma. Have three questions on this one... The first is right now...
1
3173
by: sphinney | last post by:
All, I'm not sure how to adequately explain my problem in two sentences or less, so at the risk of providing TMI, here's the condensed verion. I have developed an Access 2002 database file that...
0
7212
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7364
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7470
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4696
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3174
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1524
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
751
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.