Re: Query on a calculated field

Tech-Archive recommends: Fix windows errors by optimizing your registry



Fantastic! Thanks so much John...I set the parameter data type and used this
more simple formula.


"John Spencer" wrote:

Or you can use the IIF expression or you can use DateAdd function which will
automatically handle null values.

Field: TargetDate: DateAdd("m",6, [Actual Date])



--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

"Jeff Boyce" <JeffBoyce_IF@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:%23yitDNWFIHA.5272@xxxxxxxxxxxxxxxxxxxxxxx
Open a query in design view.

In the "field" grid, add:

YourNewField: IIF(... your expression...)

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP
http://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/

"jenniebentham" <jenniebentham@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:82787100-CE21-4F2D-91A4-928848F26FA3@xxxxxxxxxxxxxxxx
Having read millions of time not to store results of calculated fields in
tables, I have the following in a field on a form that calculates a date
6
months in the future [target date] from an field [actual date]

=IIf([Actual Date] Is Not Null,DateSerial(Year([Actual
Date]),Month([Actual
Date])+6,Day([Actual Date])))

However, I now need to produce a query and report on [target date] and I
am
unsure how to put this formula into the query. I need to produce a query
that
shows me all [target dates] within a given date range.

I can read some SQL, but usually use the Access query design view.

Thanks in advance!






.



Relevant Pages

  • Re: Query on a calculated field
    ... Access MVP 2002-2005, 2007 ... Center for Health Program Development and Management ... Microsoft Office/Access MVP ... but usually use the Access query design view. ...
    (microsoft.public.access.queries)
  • Re: Time a query
    ... Access MVP 2002-2005, 2007-2008 ... John Spencer wrote: ... You add a table to your database name named QueryResults with 4 fields: ... Dim dbAny As DAO.Database ...
    (microsoft.public.access.queries)
  • Re: Time a query
    ... "John Spencer" wrote: ... Access MVP 2002-2005, 2007-2008 ... You add a table to your database name named QueryResults with 4 fields: ... Dim dbAny As DAO.Database ...
    (microsoft.public.access.queries)
  • Re: check mark to filter data or not
    ... Dave Hargis, Microsoft Access MVP ... "John Spencer" wrote: ... ALL records when the checkbox on the form was false and only the true ... If check0 is false then return records where yesno fields are false or ...
    (microsoft.public.access.queries)
  • Re: Why Re-Link causes Corruption
    ... Doug Steele, Microsoft Access MVP ... "John Spencer" wrote: ... Try Allen Browne's article on Recovering from Corruption at: ... Oracle is not it, I've tried it on a db with no links to Oracle ...
    (microsoft.public.access.modulesdaovba)