Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 22nd, 2004, 06:12 AM
Registered User
 
Join Date: Nov 2004
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Crosstab query with no results

Hi All,

This forum did solve 50% of my problem; hopefully I can solve the rest with your help.

I created a crosstab query that counts the number of records, and distribute the results, based on a time stamp, over the 4 quarters. When there is now result for i.e. Q2, the Nz function display's a "0". Perfect so far..!

But... when there are no results at all, the result of the crosstab query is completely empty. I want four "0"'s in that case.

Please advice! This is my code:

Code:
TRANSFORM Nz(Count(Q_LicensesSeatsLargeAccounts.Quantity),0) AS CountOfQuantity
SELECT Q_LicensesSeatsLargeAccounts.Reseller
FROM Q_LicensesSeatsLargeAccounts
WHERE ((Q_LicensesSeatsLargeAccounts.Reseller)=[Forms]![F_RBSC_Selection]![cboReseller])
GROUP BY Q_LicensesSeatsLargeAccounts.Reseller, Q_LicensesSeatsLargeAccounts.Reseller
PIVOT "Q" & DatePart("q",[OrderDate]) In ("Q1","Q2","Q3","Q4");

With regards,
Eric
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Edit Query Results in Results Grid druid2112 SQL Server 2005 1 June 28th, 2007 08:49 AM
Display Crosstab Query Results - HELP? timmaher Classic ASP Databases 0 August 25th, 2005 09:47 AM
Crosstab Query Ben Access 7 November 22nd, 2004 06:08 AM
Crosstab query Berni016x SQL Server 2000 2 September 17th, 2004 10:43 AM
Crosstab query vladimir Access 1 December 1st, 2003 04:02 PM



All times are GMT -4. The time now is 05:01 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.