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
| FAQ | Members List | Calendar | 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
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 24th, 2005, 04:06 PM
Registered User
Join Date: Jan 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help with Date Range

At work we have a database with 2 relevant columns: An account number and a day that account was approved. I'm designing a query that for a given date range, will give the number of accounts approved on EACH day in that range. Simple enough. Problem is, EVERY day in the range needs to appear, whether there were any accounts approved on that day or not. I can't figure out a function to get the entire range. The end result should look like this

Date Accts_Approved
12/1/4 3
12/2/4 0 (or blank is fine,also)
12/3/4 7

as it is now, I'm just Counting accts by Date and it would look like this:

Date Accts_Approved
12/1/4 3
12/3/4 7

Reply With Quote
  #2 (permalink)  
Old February 1st, 2005, 12:30 PM
ru1 ru1 is offline
Authorized User
Join Date: Feb 2005
Location: Detroit, MI, USA.
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts

Ok Bud, time to start thinking 4th dimensional. This is what you need to do: I am going to describe it and if you need further help, coding it let me know. Here goes:

Start by using the beginning date and ending date to build a temporary table that will have all the date slots in it whether you use them or not.

Next, take the dates that you do have and go populate your temp table. After this, you now can run your report against the temp table with the complete slots. When you close your report, delete all recs in the temp table.

You can run a query against this temp table instead of a report if you need this for a query as well.

Hope this helps.


Reply With Quote

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
How to find a date range between another date rang tayvonne Access 2 August 3rd, 2006 09:50 AM
Date Range Flipflop SQL Language 6 November 25th, 2005 08:36 AM
Need Help With Date Range rpainter Crystal Reports 0 June 20th, 2005 01:01 PM
Date Range mrideout BOOK: Beginning ASP.NET 1.0 0 January 2nd, 2005 07:18 PM
Query with a date range... PLEASE HELP! tlcable7 Access ASP 2 October 1st, 2003 03:41 PM

All times are GMT -4. The time now is 11:52 PM.

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