I have a parameter query that I use to retrieve records between 2 dates. For some reason it wants me to enter the dates twice. If I skip the first 2 parameter windows and enter them in the second set, it will return the data, but if I enter it in the first set and not the last it returns empty. Any ideas?
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Parameter Query/Double Entry (Access 2003/SP 1)
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Parameter Query/Double Entry (Access 2003/SP 1)
- This topic has 6 replies, 2 voices, and was last updated 19 years, 9 months ago.
AuthorTopicWS79schultz
AskWoody LoungerSeptember 26, 2005 at 3:35 pm #424543Viewing 0 reply threadsAuthorReplies-
WSHansV
AskWoody Lounger -
WS79schultz
AskWoody LoungerSeptember 26, 2005 at 4:01 pm #975394Edited by HansV to correct problems with field name starting with “tr” (it is interpreted as a table row tag by the Lounge software)
Here it is:
SELECT [dataInt Tract Totals].Country, Sum([dataInt Tract Totals].[Tract Totals]) AS [SumOfTract Totals], Sum([dataInt Tract Totals].Packages) AS SumOfPackages, Sum([dataInt Tract Totals].[Letter Count]) AS [SumOfLetter Count], Sum([dataInt Tract Totals].Bibles) AS SumOfBibles, Sum([dataInt Tract Totals].[New Testaments]) AS [SumOfNew Testaments], Sum([dataInt Tract Totals].[Gospel of John]) AS [SumOfGospel of John], Sum([dataInt Tract Totals].Books) AS SumOfBooks, Sum([dataInt Tract Totals].SSQ) AS SumOfSSQ, Sum([dataInt Tract Totals].MOT) AS SumOfMOT
FROM [dataInt Tract Totals]
GROUP BY [dataInt Tract Totals].Country
HAVING ((([dataInt Tract Totals].Country) In (SELECT [Country] FROM [dataInt Tract Totals] As Tmp GROUP BY [Country] HAVING Count(*)>0 )))
ORDER BY Sum([dataInt Tract Totals].[Tract Totals]) DESC;I made this query probably 2 years ago when I was learning how to use Access. ( I still am) I have it referenced to a query that pulls specific data by date. The query it pulls data from (dataInt Tract Totals) pulls the data I want but I need to know the sum of each class by country and it shows the sum for every date, not by month. I know there’s a solution and I can probably do it in 1 query, but haven’t figured it out.
Here is the SQL view of the original query.
PARAMETERS [Enter beginning date] DateTime, [Enter ending date] DateTime;
SELECT tblInternational_Orders.Country, tblInternational_Orders.[Tract Totals], tblInternational_Orders.Sent, tblInternational_Orders.Packages, tblInternational_Orders.[Letter Count], tblInternational_Orders.Date, tblInternational_Orders.Bibles, tblInternational_Orders.[New Testaments], tblInternational_Orders.[Gospel of John], tblInternational_Orders.Books, tblInternational_Orders.SSQ, tblInternational_Orders.MOT
FROM tblInternational_Orders
WHERE (((tblInternational_Orders.Country) In (SELECT [Country] FROM [tblInternational_orders] As Tmp GROUP BY [Country] HAVING Count(*)>0 )) AND ((tblInternational_Orders.Date) Between [Enter beginning date] And [Enter ending date]))
ORDER BY tblInternational_Orders.[Tract Totals] DESC; -
WSHansV
AskWoody LoungerSeptember 26, 2005 at 4:11 pm #975405If you want to group data by month, you can add two calculated columns to the original query:
Y: Year([Date])
and
M: Month([Date])
You can then make this query into a totals query, and set the Total option for the Date field to Where (this will automatically clear the Show check box for this column).
-
WS79schultz
AskWoody Lounger -
WSHansV
AskWoody Lounger -
WS79schultz
AskWoody Lounger
-
-
-
-
Viewing 0 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Lost sound after the upgrade to 24H2?
by
Susan Bradley
8 hours, 46 minutes ago -
How to move 10GB of data in C:\ProgramData\Package Cache ?
by
Alex5723
15 minutes ago -
Plugged in 24-7
by
CWBillow
17 hours, 2 minutes ago -
Netflix, Apple, BofA websites hijacked with fake help-desk numbers
by
Nibbled To Death By Ducks
21 hours, 54 minutes ago -
Have Copilot there but not taking over the screen in Word
by
CWBillow
19 hours, 3 minutes ago -
Windows 11 blocks Chrome 137.0.7151.68, 137.0.7151.69
by
Alex5723
2 days, 13 hours ago -
Are Macs immune?
by
Susan Bradley
11 hours, 6 minutes ago -
HP Envy and the Function keys
by
CWBillow
1 day, 20 hours ago -
Microsoft : Removal of unwanted drivers from Windows Update
by
Alex5723
36 minutes ago -
MacOS 26 beta 1 dropped support for Firewire 400/800
by
Alex5723
3 days ago -
Unable to update to version 22h2
by
04om
8 hours, 49 minutes ago -
Windows 11 Insider Preview Build 26100.4482 (24H2) released to Release Preview
by
joep517
3 days, 8 hours ago -
Windows 11 Insider Preview build 27881 released to Canary
by
joep517
3 days, 8 hours ago -
Very Quarrelsome Taskbar!
by
CWBillow
2 days, 17 hours ago -
Move OneNote Notebook OFF OneDrive and make it local
by
CWBillow
3 days, 21 hours ago -
Microsoft 365 to block file access via legacy auth protocols by default
by
Alex5723
3 days, 9 hours ago -
Is your battery draining?
by
Susan Bradley
9 hours, 26 minutes ago -
The 16-billion-record data breach that no one’s ever heard of
by
Alex5723
9 hours, 27 minutes ago -
Weasel Words Rule Too Many Data Breach Notifications
by
Nibbled To Death By Ducks
4 days ago -
Windows Command Prompt and Powershell will not open as Administrator
by
Gordski
3 hours, 12 minutes ago -
Intel Management Engine (Intel ME) Security Issue
by
PL1
3 days, 9 hours ago -
Old Geek Forced to Update. Buy a Win 11 PC? Yikes! How do I cope?
by
RonE22
3 days, 1 hour ago -
National scam day
by
Susan Bradley
2 days, 8 hours ago -
macOS Tahoe 26 the end of the road for Intel Macs, OCLP, Hackintosh
by
Alex5723
3 days, 4 hours ago -
Cyberattack on some Washington Post journalists’ email accounts
by
Bob99
5 days, 1 hour ago -
Tools to support internet discussions
by
Kathy Stevens
3 days, 14 hours ago -
How get Group Policy to allow specific Driver to download?
by
Tex265
4 days, 17 hours ago -
AI is good sometimes
by
Susan Bradley
5 days, 9 hours ago -
Mozilla quietly tests Perplexity AI as a New Firefox Search Option
by
Alex5723
4 days, 23 hours ago -
Perplexity Pro free for 12 mos for Samsung Galaxy phones
by
Patricia Grace
6 days, 9 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.