Access 2007-2019
Access 2000-2003
Access Seminars
TechHelp Support
Tips & Tricks
Access Forum
Course Index
Topic Glossary
Insider Circle
Home   News   Tips   Glossary   Templates   Forums   Help   Logon   Order   Contact Us  

News      User Comments     History     Notify Me

10/22/2007 12:12:52 PM
Access Q&A: Sort, Group, DateDiff, Forms!Field
By Richard Rost   Richard Rost on Facebook Richard Rost on Twitter Richard Rost on Google Plus Richard Rost on LinkedIn Email Richard Rost

Here are some Access questions I've answered recently. Have your own Access question? Submit it on the Tips Page.

Hi Richard, I have a data table with some cost info in it. It also has columns by month in it. In a few of the cost info columns, there is date info in it for tracking purposes. Is it possible to show that info an access report, where I could show the month at the top (as a column header) and show the respective data up under it according to the date in the column? For example: I have the months: Jun, Jul. I have 2 fields Cats & Dogs. I sold x amount of cats between 6/30/07 - 07/07/07. I sold x amount of dogs between 6/12/07 - 7/31/07. I would like to have the report show like a calendar with June and July at the top, and to the left, I would have cats and dogs on two rows. The dates would be under June and July respectively. Can you assist?

What you need to do, essentially, is to create a report with SORTING AND GROUPING where you have your month as one grouping level, and then under it each "item" (cats, dogs) as another grouping level. It's a bit too much detail to go into here, but I do cover this topic in my Microsoft Access 104 tutorial here:

Hello Richard, I’m building an Access application that registers clients who comes into an office, after registering they are forwarded to an interview process. I need to track the time from when they register to when the interview begins (WaitTime), and the length of the interview (InterviewLength). The registration information is stored in registration table that is link to interview table that stores the interview information. I’m using the function “=Now()” to record the registration time and the interview start and end time. How do I stop the timer when the interview begins and end. And can I use the function “DateDiff(“n”,ReistrationTime-InterviewStart)” to calculate the wait time and the interview length?

I would use a button to close your form where the interview is taking place. This way, the OnClose event could save the time in your table, and you wouldn't need a Timer function. Just mark the time the form was opened and closed.

Yes, you could use the DateDiff function, but you can also bank on the fact that one day = 1 in Access. So if you simply subtracted the start time from the end time, you're left with a fraction of a day (so 12 hours = 0.5). Multiply that by 24 and you have the number of hours.

I start talking about Event programming in my Access 206 tutorial ( and time differences in Access 221 (

I have multiple sub-reports, each based on a parameter query. The criteria field is the same in all of them. When I create a main report, it asks me to input the parameter value as many times as there are sub-reports. Is there a way that I can give the parameter value only once for the main report?

Certainly. Use a form to supply your parameter. You can refer to it as Forms!FormName!FieldName from inside your report or query. Then, just use a command button on the form to open your report. I cover this technique in my Access 202 Tutorial (

Permanent Link
Keywords: access tips
Post Reply

Add Your Comments or Subscribe
If you just want to subscribe to get email updates when the News is updated, then enter your name and email address and check the Notify Me box below. If you would optionally like to add your comments below to be posted, they are welcome.
  Your Name:  Required
  Your Email:  NOT Public


Sorry about this step. It's just to keep the spam bots away:
  Verify: What is 3+5:
  Notify me when the News is updated.
  Remember Me for my next comments
Please do not use this form for Customer Service inquiries! If you have questions about your account, shipping info, courses you've ordered, need passwords, etc. please use the Customer Service Center instead.

I value your comments. They will be displayed on this page (above). Your name will be displayed, but your email address will not be.
As always, I promise to never give away your personal information to anyone else, ever.

NOTE: If you don't leave your name and email address, DON'T expect a reply. I can't promise a personal reply to everyone who posts here. I TRY my best, but I cannot guarantee it. If you don't leave your real name and email address, I won't even bother. I usually just hit DELETE. -Richard



You may want to read these articles from the 599CD News:

3/26/2020Sorted Combo Box Values
3/23/2020Browsing and Selecting Files
3/14/2020New Access Group
3/6/2020NEW Access 2019 for Beginners
8/15/2019Last Chance for Access CDs
8/1/2019Customer List Form Template
8/1/2019New Template Access Customer Database
7/30/2019Microsoft Access Developer 13
6/20/2019TIP: Validation Rules in Access
11/20/2018Microsoft Access Developer 12

Visual Basicindex
Account Login
Online Theater
Lost Password
Free Upgrades
Insider Circle
Student Databases
Change Email
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search Our Site
Waiting List
Production Schedule
Collapse Menus
Live Chat
Customer Support
WalkThru Tutorials
Consulting Services
About Us
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Video Tutorials
MYOLP Memberships
Idiot's Guide to Excel
Volume Discounts
Payment Info
Terms of Sale
Gift CDs
Live Chat
General Info
Support Policy
Contact Form
Email Us
Mailing Address
Phone Number
Fax Number
Course Survey
Facebook    Twitter

Google Plus    LinkedIn

Blog RSS Feed    YouTube Channel
Richard Rost Microsoft MVP