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 | 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 March 17th, 2008, 04:08 PM
Authorized User
Join Date: Mar 2008
Location: , NJ, USA.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default How can I make this query


I have the following data
year race date starts track
2004 8/14/2004 1 freehold

i am trying to change this data base into this report format.

year type jan ..... dec total
2004 starts 1 ..... 5 6
2004 points 5 ...... 10 15

Would have months jan - dec in title. For starts you just count the number of times raced at the different tracks.
For points you only count each track/day once

I am using access 2007 to do this and I am not sure what the best way to proceed is.
Any help would be appreciated.

Reply With Quote
  #2 (permalink)  
Old March 19th, 2008, 05:54 AM
Friend of Wrox
Join Date: Oct 2007
Location: , , .
Posts: 130
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via AIM to urtrivedi

Please specify what values(all possible values) starts and track field may contain.
and how u watn to show them in report.

Also when their is a date then why u have used separate year column.


Help yourself by helping someone.
Reply With Quote
  #3 (permalink)  
Old March 19th, 2008, 07:36 AM
Authorized User
Join Date: Mar 2008
Location: , NJ, USA.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts

Rec No Race Date Track Code Race No Pole Position Driver Code Trainer Code
2 1/1/2002 F 1 2 31 4433
3 1/1/2002 F 1 3 498 3709
4 1/1/2002 F 1 5 794 674
5 1/1/2002 F 1 6 292 2858
6 1/1/2002 F 1 7 3489 1020
7 1/1/2002 F 1 8 1833 445
8 1/1/2002 F 2 1 1195 3667
9 1/1/2002 F 2 2 4580 4583
10 1/1/2002 F 2 3 700 580

this is the first few records in the database
the starts and year field are just sompthing i did in a query. realy the only fields that are needed is the date and driver/trainer fields.
with this sample data all 18 people would get 1 point and 1 start in jan 2002 if they had raced more than once on 1/1/2002 then they could have more than one start but would still have only 1 point. unless they raced at a different track on the same day.

Reply With Quote
  #4 (permalink)  
Old March 19th, 2008, 05:13 PM
Authorized User
Join Date: Mar 2008
Location: , NJ, USA.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts

was able to make 2 queries (one for trainer another for driver)
and use the sum function with grouping by date to get the totals into a new query and combine the 2 queries with a union query

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
Make Table Query CongoGrey Access 2 June 1st, 2007 06:22 AM
how to make a query from an existing query raport SQL Language 3 November 13th, 2006 08:59 PM
Make table Query and Datepart marshaji Access 1 June 21st, 2005 12:36 PM
How to make a query to google? tqmk1982 BOOK: Beginning Java 2 1 March 26th, 2004 02:12 PM
Error on Make-Table Query In Union Query rylemer Access 1 August 20th, 2003 07:42 PM

All times are GMT -4. The time now is 10:58 PM.

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