Solved Link Date Picker Control to Query & Macro Function (1 Viewer)

Sarah.M

Member
Local time
Today, 02:56
Joined
Oct 28, 2021
Messages
335
Hi, Plz note, My VBA is disabled for security reason.
I can use only Expression builder, Macros, Queries, Tables, Forms and Reports only.
------------------------------------------------
Hi, I make Statistic Form and Query, to count orders Today, Week, Month and Year, and to make it fixable I add buttons
in Macro I use number manually I think if there is functions it will be more accurate, plz help me to make it accurate:
1. I could not link Date Picker with query, becuse the "Total is enabled"
2. Week how can I make it accurate?
3. Month sometimes 29 or 30 or 31 how can I make it more accurate?
4. Year how can I make it accurate?

Sample Attached
1636440457854.png
 

Attachments

  • ‏‏‏‏‏‏SaveFilter9AskStastic.zip
    163.2 KB · Views: 251

Ranman256

Well-known member
Local time
Yesterday, 19:56
Joined
Apr 9, 2015
Messages
4,339
all these are already accurate. Year(datefld) give you the year....etc.
Date picker only picks dates.

i would use 2 date fields: txtStartDate and txtEndDate.
then using the form, you can set 'date groups' like monthly that sets the Start/End dates for you.

then your query can pull from the form:
select * from table where [DateFld] between forms!fMyForm!txtStartDate and forms!fMyForm!txtEndDate
 

Attachments

  • date set.png
    date set.png
    15.5 KB · Views: 388

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 07:56
Joined
May 7, 2009
Messages
19,229
here check and test your stat form
 

Attachments

  • ______SaveFilter9AskStastic.zip
    127 KB · Views: 404

Users who are viewing this thread

Top Bottom