Help with formula

W

WolFox

I wrote the formula, if(B:B-365>TODAY()-365," Yes". "No") in Excel and it
worked how I wanted it to.

Now, I want to convert it into a formula for Access. I know I have to use
[column title] instead of B:B. Does anyone know if this is possible?
 
K

Ken Snell \(MVP\)

Where in ACCESS do you want to use this? In a query? On a form? On a report?
In VBA code? In a macro's Condition expression? Please provide us with more
information.

The Date() function in ACCESS is the "equivalent" to TODAY() from EXCEL.
 
W

WolFox

What I would like to do is to be able to do is to put a date in a column and
then be ale to get a report of which dates are more than one year old.
 
W

WolFox

WolFox said:
What I would like to do is to be able to do is to put a date in a column and
then be ale to get a report of which dates are more than one year old.

And I would like it to give the word "No" instead of showing the date.
 
W

WolFox

OK, scratch the last posts. What I have is names of people with dates next to
them. I would like to have a report show a list of the names whose dates are
older than one year.
 
K

Ken Snell \(MVP\)

A query with a calculated field may be what you seek:

SELECT Field1, Field2, Field3,
"Older Than One Year" AS Status
FROM Tablename
WHERE DateDiff("d", DateField, Date()) > 365;
 
K

Ken Snell \(MVP\)

You could use it (after changing the generic names of fields and table to
the real names) as the Record Source of a report.
 
W

WolFox

What field should I make be Field1, etc.?
I have fields with LastName, FirstName, an IDNumber, and the one with the
date.
 
K

Ken Snell \(MVP\)

Those are just generic names. This query statement uses your field names:

SELECT FirstName, LastName, IDNumber,
"Older Than One Year" AS Status
FROM Tablename
WHERE DateDiff("d", RealNameOfDateField, Date()) > 365;
 
W

WolFox

Now I have something else I'd like to do. I've added a lookup table column to
my table. I'd like to have it display the same message as the other query if
there is a value, any value, in this column.
 
Top