I have a query that is a totals query (See attached).
For one of the fields I have in the criteria field – Like “*” & [Sic Description] & “*”.
I want them to be able to put something like “Plastic” and get everything that has “Plastic” in the Sic Description field.
I want to use this query in another query (see attached) and make it a Crosstab query. Is this possible to do? The way I have constructed my crosstab query isn’t working with the parameter. I get an error (see attached). Is there any way to use a parameter with a crosstab? Thanks for your help.
![]() |
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 |
-
Crosstab Query with Parameter (2000)
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Crosstab Query with Parameter (2000)
- This topic has 23 replies, 4 voices, and was last updated 19 years, 10 months ago.
AuthorTopicWSLindaR
AskWoody LoungerMay 13, 2005 at 2:10 pm #419511Viewing 0 reply threadsAuthorReplies-
WSHansV
AskWoody LoungerMay 13, 2005 at 2:50 pm #947446 -
WSLindaR
AskWoody LoungerMay 13, 2005 at 3:07 pm #947450Thanks Hans that got me past the first problem.
I am using the crosstab query for a report.
When I run the report the parameter comes up. I enter “Plastic” and then another parameter comes up and I have to enter “Plastic” a second time.
If I do not enter anything the second time the parameter comes up, I get everything.
Entering it twice gets me the correct report but is there a way to get it to only ask once?Disregard – I don’t know what I did but two parameters do not come up now.
Thank you for your help…. -
WSLindaR
AskWoody LoungerMay 13, 2005 at 3:24 pm #947459Hans – I have to eat my words.
Both queries work fine.
When I use the crosstab query to make the report, I get errors.
For some reason when I enter “Plastic” the report does create even though sometimes the parameter comes up twice (It reverted back to that behavior)
I get the following error when I enter “Auto” for instance
“The Microsoft Jet Database engine does not recognize ” as a valid field name or expression
Just running the query works fine but when I use it to create a report it goes bananas. -
WSHansV
AskWoody LoungerMay 13, 2005 at 3:41 pm #947464A common problem when using a crosstab query as record source for a report is that the number and names of the fields (columns) may change. A field that was present when you designed the report may not be available when you run it later on.
If the total number of possible fields is limited, you can specify them in the Column Headings property of the crosstab query (list them, separated by commas).
Otherwise, you’ll have to use VBA code to make the report dynamic. This is far from trivial, but it can be done. See the thread starting at post 365323. My first reply contains links to some posts about this subject, and I attached a demo further down. -
WSLindaR
AskWoody Lounger
-
-
-
WSThom_D
AskWoody LoungerJuly 28, 2005 at 8:35 pm #963293Hans,
I am having the same problem with a crosstab query I am building based on a parameter query that asks for a start date, end date and Ops Group. I get a similar error message, The Microsoft Jet Database engine does not recognize ‘[Start Date]’ as a valid name or expression.
I set the parameters as you instructed, but the original query pops up an additional parameter box with the Between [Start Date] And [End Date] and then pops up the actual start and end date boxes. If I ignore the first box and plug the dates into the 2nd and 3rd boxes the query runs fine.
-
WSHansV
AskWoody LoungerJuly 28, 2005 at 9:24 pm #963299Could you post a stripped down copy of your database? See post 401925 for instructions.
-
WSThom_D
AskWoody LoungerJuly 29, 2005 at 2:38 am #963306(Edited by charlotte on 28-Jul-05 20:38. )
For your own privacy protection, we encourage you to refer to your profile rather than posting your email address.
Also, please remember Rule 10Hans,
I can’t get it small enough. Is there a way I can email it to you? You can respond to me directly if you would like.
Thanks
Thom
-
WSHansV
AskWoody Lounger -
WSThom_D
AskWoody Lounger -
WSFrancois
AskWoody Lounger -
WSThom_D
AskWoody LoungerAugust 1, 2005 at 4:49 pm #963823Thanks, I didn’t understand that Start Date and End Date had to be on separate lines. I thought the parameters were supposed to be the same as in the original query. This worked fine.
Now I need to figure out how to get the crosstab query to drop zeros in the blank fields for each location that doesn’t have a listed issue incident in a particular month. How do I go about that?
Thanks again.
-
WSFrancois
AskWoody LoungerAugust 1, 2005 at 5:39 pm #963831Open the crostab query in design view.
Select the Total field.
Open the property window ( View , Properties or the Properties button)
In the format line, enter :
#,#,0,0
The first # determine the format when the number is positive
The second # determine the format when the number is negative
The first 0 determine the format if the number is 0 (zero)
And the second 0 deternine the format when the number is Null. What you asked in your question. -
WSThom_D
AskWoody LoungerAugust 1, 2005 at 7:12 pm #963864I must be doing something wrong. I open the query, select the Total field by clicking on the top to select that column in the grid and open the Properties dialogue. I try to type the format you recommended in the format line but it won’t let me type a comma between the two zeros. I get
#,#,00.What am I doing wrong this time?
Thanks for your help.
-
WSFrancois
AskWoody Lounger -
WSHansV
AskWoody Lounger -
WSFrancois
AskWoody LoungerAugust 1, 2005 at 7:31 pm #963873 -
WSHansV
AskWoody LoungerAugust 1, 2005 at 7:48 pm #963877In expressions, you must use the list separator character specified in the Regional Settings control panel. In the US, the comma acts as list separator, and in Belgium and The Netherlands, the semicolon is the default list separator. Example:
US:
=DCount("*", "qryProducts", "CategoryID=3")
Belgium/Netherlands:=DCount("*"; "qryProducts"; "CategoryID=3")
Because the comma is either the thousands separator (US) or the decimal separator (Belgium/Netherlands), it can’t be used as format separator; therefore semicolon is used in both. Example:
US:
#,##0.00;(#,##0.00)
Belgium/Netherlands:#.##0,00;-#.##0,00
-
WSFrancois
AskWoody Lounger -
WSThom_D
AskWoody LoungerAugust 1, 2005 at 7:57 pm #963883The semicolon worked great.
Now I have to build a dynamic crosstab report. From what I have read in the threads I looked up under dynamic crosstab reports there is no short cut to do this. My problem will be the number of locations we have versus the actual number of locations that will be included in the output from the crosstab query. I.E. 51 actual locations and perhaps 10 – 12 that would appear in the crosstab each month based on the issues that get reported.
Do I need an unbound text box on the reports design page for each location, or can I simply assume that there would be less than 15 locations reporting each month and only include 15 unbound text boxes?
Thanks again, you guys are the best.
-
WSFrancois
AskWoody LoungerAugust 1, 2005 at 8:11 pm #963885Go to rogersaccesslibrary for a sample database with a dynamic report on crosstab queries.
DownLoad Page -
WSThom_D
AskWoody LoungerAugust 1, 2005 at 10:56 pm #963906OK, I get how to set up the blank report in the design view. But since I am not a programmer, although it is starting to look like I will need to learn at least enough VBA to survive, I am not sure what to modify in the code besides the number of columns I am working with and the name of the original crosstab query, I am getting runtime error messages that I am not sure what to do with.
-
WSFrancois
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
-
Have Copilot there but not taking over the screen in Word
by
CWBillow
14 minutes ago -
4 Strange Facts About Тостер За Сандвичи (Awaiting moderation)
by
rosalinepettey6
6 hours, 25 minutes ago -
Windows 11 blocks Chrome 137.0.7151.68, 137.0.7151.69
by
Alex5723
14 hours, 48 minutes ago -
Are Macs immune?
by
Susan Bradley
12 hours, 11 minutes ago -
HP Envy and the Function keys
by
CWBillow
17 hours, 53 minutes ago -
Microsoft : Removal of unwanted drivers from Windows Update
by
Alex5723
1 day, 2 hours ago -
MacOS 26 beta 1 dropped support for Firewire 400/800
by
Alex5723
1 day, 2 hours ago -
Unable to update to version 22h2
by
04om
13 hours, 5 minutes ago -
Windows 11 Insider Preview Build 26100.4482 (24H2) released to Release Preview
by
joep517
1 day, 9 hours ago -
Windows 11 Insider Preview build 27881 released to Canary
by
joep517
1 day, 9 hours ago -
Very Quarrelsome Taskbar!
by
CWBillow
19 hours, 42 minutes ago -
Move OneNote Notebook OFF OneDrive and make it local
by
CWBillow
1 day, 22 hours ago -
Microsoft 365 to block file access via legacy auth protocols by default
by
Alex5723
1 day, 11 hours ago -
Is your battery draining?
by
Susan Bradley
9 hours, 31 minutes ago -
The 16-billion-record data breach that no one’s ever heard of
by
Alex5723
9 hours, 54 minutes ago -
Weasel Words Rule Too Many Data Breach Notifications
by
Nibbled To Death By Ducks
2 days, 2 hours ago -
Windows Command Prompt and Powershell will not open as Administrator
by
Gordski
1 day, 10 hours ago -
Intel Management Engine (Intel ME) Security Issue
by
PL1
1 day, 10 hours ago -
Old Geek Forced to Update. Buy a Win 11 PC? Yikes! How do I cope?
by
RonE22
1 day, 3 hours ago -
National scam day
by
Susan Bradley
10 hours, 4 minutes ago -
macOS Tahoe 26 the end of the road for Intel Macs, OCLP, Hackintosh
by
Alex5723
1 day, 6 hours ago -
Cyberattack on some Washington Post journalists’ email accounts
by
Bob99
3 days, 3 hours ago -
Tools to support internet discussions
by
Kathy Stevens
1 day, 16 hours ago -
How get Group Policy to allow specific Driver to download?
by
Tex265
2 days, 18 hours ago -
AI is good sometimes
by
Susan Bradley
3 days, 10 hours ago -
Mozilla quietly tests Perplexity AI as a New Firefox Search Option
by
Alex5723
3 days ago -
Perplexity Pro free for 12 mos for Samsung Galaxy phones
by
Patricia Grace
4 days, 11 hours ago -
June KB5060842 update broke DHCP server service
by
Alex5723
4 days, 9 hours ago -
AMD Ryzen™ Chipset Driver Release Notes 7.06.02.123
by
Alex5723
4 days, 13 hours ago -
Excessive security alerts
by
WSSebastian42
3 days, 4 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.