If statement for Access query

ac98

New member
Local time
Today, 08:13
Joined
May 7, 2008
Messages
4
Could someone please help me... I need to create an If statement, but don't know how to write it... Please note all the dates are in seperate columns. Not sure if that matters.

If “sale date” is between or = to “start date” and “end date” then include gross sales, if not then leave null?
Is this even possible?

I'm also doing this in the design query, not SQL statement. I'm not that advanced yet.
 
the if statement in access is actually an iif statement.

Try using the expression builder to help build the expression.

The expression will be something like:
Code:
iif( [Yourtable]![saledate] >= [Yourtable]![startdate] and  [Yourtable]![saledate] <= [Yourtable]![enddate] ,[yourtable]![Gross Sales],Null)
 
Thank you soo much, that worked perfect!!!!! I really appreciate it!
 

Users who are viewing this thread

Back
Top Bottom