Results 1 to 7 of 7
  1. #1
    txacoli is offline Novice
    Windows Vista Access 2007
    Join Date
    Nov 2010
    Posts
    19

    Newbie requires help on a very easy question

    I've just started using Access at work and although they're going to send me on a course soon, I've been asked to put together a project before I start......and I'm falling at the first hurdle.

    I have a very simple database which lists dates of referral to a team. I want the query to stipulate how many referrals we received in each month for the year. Nothing more difficult than that, but I can't find out how to do this.

    Please bear in mind that I am a total newbie at Access and will need anything explaining in words of one syllable.....or less!!!



    Thanks in advance

  2. #2
    Rixxe is offline Blessed Bear
    Windows 7 Access 2007
    Join Date
    Sep 2010
    Location
    London (Essex ... yep!)
    Posts
    184
    Firstly i would suggest googling everything you need to know (Seems to work well for me at least)

    If you want to count referrals you could use 'count', something like this:

    Code:
     
    SELECT Referral, Record_Count=Count(*)
    FROM Table1
    GROUP BY Referral
    Or

    Code:
     
    SELECT
    Count_1=(SELECT Count(*) FROM Table1 WHERE Referral = 1),
    Count_2=(SELECT Count(*) FROM Table1 WHERE Referral = 2)
    My honest opinion would be to search the net for simple explanations on how to use certain functions something like:
    http://www.w3schools.com/sql/default.asp

    And then build on a basic query with whatever else you want to add.
    Worst comes to worse you can copy whatever SQL code you have, table names and column names... and someone here will probably have the answer for you.

    Good luck.

    Rixxe
    Last edited by Rixxe; 11-04-2010 at 06:51 AM. Reason: Detail

  3. #3
    txacoli is offline Novice
    Windows Vista Access 2007
    Join Date
    Nov 2010
    Posts
    19
    Thanks Rixxe, but I'm still struggling. I've looked and looked on Google before posting this and have looked again since your answer and I still can't find what i'm looking for.

    I have a very simple database which looks at how many people come through my team in a year. All I want to do is create a query which checks the DateOfReferral field and tells me how many came through each month in total, so it looks something like this.....

    Jan 12
    Feb 23
    March 22

    etc etc. I can't find anything anywhere, so if there's anything you or anyone else can help with, I'd be extremely grateful.

    Thanks

    Matt

  4. #4
    Rixxe is offline Blessed Bear
    Windows 7 Access 2007
    Join Date
    Sep 2010
    Location
    London (Essex ... yep!)
    Posts
    184
    Ok.

    Well using the query i showed you above: (This works, i tested it btw)

    Code:
    SELECT MONTH(DateOfReferral), COUNT(*)
    FROM table1 
    WHERE referral <> null
    GROUP BY MONTH(DateOfReferral)
    'referral' is just a field with something in it (doesnt matter what)

  5. #5
    Rixxe is offline Blessed Bear
    Windows 7 Access 2007
    Join Date
    Sep 2010
    Location
    London (Essex ... yep!)
    Posts
    184
    I should probably explain (Instead of spam editing my mistakes) that...

    If there is nothing in the referral field, it won't be counted (which is what you want).
    If your date field is in date format, it will work. If its in text format (text string) it wont.

    Hopefully that helps you out. If you want, i can paste my tables and results of my query just so you know how i used it.
    It's probably very similar to how you described above.

    Good luck

    Rixxe

  6. #6
    txacoli is offline Novice
    Windows Vista Access 2007
    Join Date
    Nov 2010
    Posts
    19
    Rixxe, thanks so much. I know I asked a basic question and it's very kind of you to help me out. I am a fast learner and will use what I've learned to good effect, but can't promise that I won't be back here from time to time!!

    Many thanks

    Matt

  7. #7
    Rixxe is offline Blessed Bear
    Windows 7 Access 2007
    Join Date
    Sep 2010
    Location
    London (Essex ... yep!)
    Posts
    184
    You are very welcome, hope it all goes well and good luck with any projects in the future.

    Rixxe

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Easy question
    By Danzig in forum Access
    Replies: 11
    Last Post: 10-28-2010, 06:48 PM
  2. Super easy question probably
    By octoentandre in forum Database Design
    Replies: 2
    Last Post: 08-30-2010, 12:21 PM
  3. Easy newbie question
    By pontuse in forum Access
    Replies: 4
    Last Post: 11-08-2009, 08:02 AM
  4. HELP NOOB! Easy question
    By SigmaBlu in forum Queries
    Replies: 1
    Last Post: 10-10-2009, 11:23 AM
  5. easy checkbox question
    By nelsok in forum Forms
    Replies: 1
    Last Post: 06-09-2006, 05:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums