New User needs Function

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!
 
B

Bas Cost Budde

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
 
T

Tim Ferguson

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
 

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

Top