New User needs Function

  • Thread starter Thread starter Denise
  • Start date Start date
D

Denise

Thnks to everyone who has been helping me over the last
couple of days!!

Using this expression:

=Sum(IIf(Month([DateAcquired])>5,[PurchasePrice]/
[DepreciableLife],0))

What I need it to say now, instead of Month is "if
DateAcquired is the same year as this year AND is June or
less" then [PurchasePrice, etc,, 0)

How does Access express this?

Thanks again!
 
Denise said:
Thnks to everyone who has been helping me over the last
couple of days!!

Using this expression:

=Sum(IIf(Month([DateAcquired])>5,[PurchasePrice]/
[DepreciableLife],0))

What I need it to say now, instead of Month is "if
DateAcquired is the same year as this year AND is June or
less" then [PurchasePrice, etc,, 0)

DateAcquired in this year: year(DateAcquired0=year(date())
DateAcquired lies before july: month(DateAcquired) < 7
 
What I need it to say now, instead of Month is "if
DateAcquired is the same year as this year AND is June or
less" then [PurchasePrice, etc,, 0)

= IIf(
Year(DateAcquired)=Year(Date()) AND
Month(DateAcquired)<=6,
TruePart,
FalsPart
)


Of course, you probably need to type it in on one line, but that is how the
structure should work.

Hope that helps


Tim F
 
Back
Top