Computer Learning Zone CLZ Access Excel Word Windows

You know it's true... Every disaster movie begins with a scientist being ignored.

-Neil deGrasse Tyson
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to Visitor Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Daily Sales
Steve Moby 

2 years ago
Hi All
I'm following the "Creating a Dashboard Form in Microsoft Access" tutorial
There are three orders with todays date in them, they show on the graph but not in the textbox?

=Nz(DSum("OrderTotal","qryOrderSummary","OrderDate >=#" & Date() & "#"),0)

I put a date function in the header just to check it was working ok. I even did another textbox for weekly

=Nz(DSum("OrderTotal","qryOrderSummary","OrderDate >=#" & Date()-7 & "#"),0).... This one works?

I've checked the Qry and table they both show orders for the 06/03/2024 (today's date)
Re done the whole tutorial 3 times same thing any Ideas why this is not working am I doing something wrong?
Thanks in advance
Steve
Alex Hedley  @Reply  
           
2 years ago
If you hardcode it =Nz(DSum("OrderTotal","qryOrderSummary","OrderDate >=#3/6/24#"),0) does it work?
Steve Moby OP  @Reply  

2 years ago
Hi Alex it won't let me reply to you?
Yes that works hardcoding the date but that would mean changing the date everytime.
Also your date format is different which works but when i change it to 06/03/2024 it doesn't?
Adam Schwanz  @Reply  
           
2 years ago
I've had so much trouble with programming date fields from the US using mm/dd/yyyy then sending it to someone internationally who uses dd/mm/yyyy. Is your Date-7 the right numbers for your last 7 days? Or is it potentially calculating a different date range using mm/dd instead?

I'd suggest looking into ISO Date Format ISO Date Addendum 1
Richard Rost  @Reply  
          
2 years ago
ISO is the WAY TO GO!
Steve Moby OP  @Reply  

2 years ago
Hi Adam
Yes it displays the correct amount for -7 -14 -365 days.
I put the function "Date()" in a text field on the form to see it it was formating correctly, it was, it seems only to be for the 1 day field it doesn't work?
tried the ISO date format still the same?
I'm biting chunks out my screen trying to figure out why lol :)
Regards
Steve
Adam Schwanz  @Reply  
           
2 years ago
So just to confirm there's no weird issue with the mm/dd vs dd/mm. When you make a textbox with Month(Date()), is that coming up as 3? and a textbox with Month(OrderDate) is the same for todays stuff?
Steve Moby OP  @Reply  

2 years ago
Hi Adam
No there seems to be no other issue and yes it shows 3
Even the chart has the right amount for the dates in it it only seems to be for the daily sales?
I've rebuilt the textbox about half a dozen times even tried a new form same problem exits is bloody weird?
Regards
Steve
Adam Schwanz  @Reply  
           
2 years ago
Yea strange, something else must be off. Few other ideas that may be doing something weird.

Is Time a factor at all? Is OrderDate just a date or with time? Shouldn't matter with >= but just throwing it out there if it sparks an idea.

Does doing >Date()-1 work? (no equal, assuming no times)

Also to confirm, when you open up that specific query the records with todays values are actually showing in that query? There's no weird criteria stuff going on.
Steve Moby OP  @Reply  

2 years ago
Hi again Adam
All the dates show in the query with the 06/03/2024 format
There doesn't seem to be an issue with the date format because it shows the correct sales amount for all other date criteria
On the graph it shows the correct day with the correct sales for that day?
it's just in that one text box that has the problem for the daily sales?
I only put the year texbox on the form just to see if it works and it does?
the table shows the dates correct, the qry shows the dates correct it just won't show on the form for the daily sales that Richard displayed?
Regards
Steve
Adam Schwanz  @Reply  
           
2 years ago
Did >Date()-1 work and give you only todays?
Steve Moby OP  @Reply  

2 years ago
No Adam the Date()-1 just shows '0.00
Adam Schwanz  @Reply  
           
2 years ago
I was just re-reading through the post and seen this

Also your date format is different which works but when i change it to 06/03/2024 it doesn't?

I would be inclined to think it's almost certainly a mm/dd vs dd/mm thing. This is one of the reasons I stopped doing jobs for international people and moved to ISO Dates. You pull your hair out on stuff like this :(. If the chart your talking about uses the same query, it just may behave differently than a text box does, hard to say without testing. I would just advise moving over to ISO dates completely, did you also watch the ISO Date Addendum 1? We don't just want to format them.
Steve Moby OP  @Reply  

2 years ago
Hi Again Adam
Yeah I followed Richards advice and changed my computer over to ISO but it was still the same. Also the adendum tried that but still no joy.
Funny enough I tried -1 to -3 nothing but when i put -4 it shows the sales from  the begining of the month?
I think I'll try another route like a query for daily sales or something.
Best Regards
Steve
Richard Rost  @Reply  
          
2 years ago
Instead of explaining what you've done that doesn't work, how about explaining what you're trying to do in plain English?

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Visitor Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 7/31/2026 11:09:21 PM. PLT: 0s