A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Help with formula



 
 
Thread Tools Display Modes
  #1  
Old June 23rd, 2007, 05:36 PM posted to microsoft.public.access
WolFox
external usenet poster
 
Posts: 8
Default 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  
Old June 23rd, 2007, 05:49 PM posted to microsoft.public.access
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default 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  
Old June 23rd, 2007, 06:18 PM posted to microsoft.public.access
WolFox
external usenet poster
 
Posts: 8
Default 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  
Old June 23rd, 2007, 06:35 PM posted to microsoft.public.access
WolFox
external usenet poster
 
Posts: 8
Default 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  
Old June 23rd, 2007, 07:00 PM posted to microsoft.public.access
WolFox
external usenet poster
 
Posts: 8
Default 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  
Old June 23rd, 2007, 07:13 PM posted to microsoft.public.access
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default 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  
Old June 23rd, 2007, 07:38 PM posted to microsoft.public.access
WolFox
external usenet poster
 
Posts: 8
Default Help with formula

One question: where exactly do I enter this?
  #8  
Old June 23rd, 2007, 07:41 PM posted to microsoft.public.access
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default 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  
Old June 23rd, 2007, 09:11 PM posted to microsoft.public.access
WolFox
external usenet poster
 
Posts: 8
Default 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  
Old June 23rd, 2007, 10:00 PM posted to microsoft.public.access
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:00 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.