If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Help with formula
I wrote the formula, if(B:B-365TODAY()-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? |
#2
|
|||
|
|||
Help with formula
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. -- Ken Snell MS ACCESS MVP "WolFox" wrote in message ... I wrote the formula, if(B:B-365TODAY()-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? |
#3
|
|||
|
|||
Help with formula
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. |
#4
|
|||
|
|||
Help with formula
"WolFox" wrote: 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. |
#5
|
|||
|
|||
Help with formula
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. |
#6
|
|||
|
|||
Help with formula
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; -- Ken Snell MS ACCESS MVP "WolFox" wrote in message ... 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. |
#7
|
|||
|
|||
Help with formula
One question: where exactly do I enter this?
|
#8
|
|||
|
|||
Help with formula
You could use it (after changing the generic names of fields and table to
the real names) as the Record Source of a report. -- Ken Snell MS ACCESS MVP "WolFox" wrote in message ... One question: where exactly do I enter this? |
#9
|
|||
|
|||
Help with formula
What field should I make be Field1, etc.?
I have fields with LastName, FirstName, an IDNumber, and the one with the date. |
#10
|
|||
|
|||
Help with formula
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; -- Ken Snell MS ACCESS MVP "WolFox" wrote in message ... What field should I make be Field1, etc.? I have fields with LastName, FirstName, an IDNumber, and the one with the date. |
|
Thread Tools | |
Display Modes | |
|
|