Help with formula

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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.
 
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.
 
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.
 
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.
 
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;
 
You could use it (after changing the generic names of fields and table to
the real names) as the Record Source of a report.
 
What field should I make be Field1, etc.?
I have fields with LastName, FirstName, an IDNumber, and the one with the
date.
 
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;
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Anyone Else Facing Public Folder Migration Errors in Exchange? 0
IF formula 8
Excel Sumproduct 0
Trailing 30 days sum calculation with excel 1
Age Formula 12
SUMIF problem 5
COUNTIF AND COUNTIF 3
Excel Date Setting 1

Back
Top