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?
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
If you hardcode it =Nz(DSum("OrderTotal","qryOrderSummary","OrderDate >=#3/6/24#"),0) does it work?
Steve MobyOP
@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?
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 MobyOP
@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 MobyOP
@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 MobyOP
@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 MobyOP
@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
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Visitor Forum.