troubleshooting Question

Can I Create A Conditional Select Statement In Access 2007?

Avatar of ES-Components
ES-ComponentsFlag for United States of America asked on
Microsoft Access
5 Comments1 Solution645 ViewsLast Modified:
I have attached an Excel spreadsheet of what my Access 2007 table looks like.
Currently I am displaying the results on a web page that has 3 select statements that produce results.
The first select statement gives me the "Total Sales" for the Week.
The second select statement gives me the "Total Sales" for the Day.
The third select statement gives me the "Detail Information" for the day.

1.) SELECT IIF(SUM(Sales) is NULL,0,SUM(Sales))
      FROM WeekBookTotal
      WHERE Expr1=-1

2.) SELECT SUM(Sales)
      FROM WeekBookTotal
      WHERE Day=Date()

3.) SELECT *
      FROM WeekBookTotal
      WHERE Day=Date()

My problem is, is if there are NO Bookings(Sales) today, (Select statements 2 & 3),
the Total for the week, (Select statement 1), does NOT display.

Is there a way of showing the total for the week even if there are NO sales today?

Any help would be greatly appreciated.

Thank you...
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros