Results 1 to 3 of 3
  1. #1
    gtrudel is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2011
    Posts
    4

    Access Query Issue with 2012 dates

    Hi,
    The attached query works with the underlying schedule setup table with 2011 dates. When I put in the 2012 dates the query does not return the correct data.
    The first row has a date of 4/18/2012. Yet the query doesn't return any rows with this date. It should return 6 rows for Wk1.
    Query
    SELECT DISTINCTROW [Schedule Setup].Week, PLNAMES.Division, PLNAMES.Handicap, PLNAMES.Name, PLNAMES.Team, Int(Choose([Team],[1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12])) AS Expr1, [Schedule Setup].[Front/Back], [Schedule Setup].Event
    FROM PLNAMES, [Schedule Setup]
    WHERE (((Int(Choose([Team],[1],[2],[3],[4],[5],[6],[7],[8],[9],[10],[11],[12])))>[team]))
    ORDER BY [Schedule Setup].Week, PLNAMES.Division;

    First few rows of output


    Week Division Handicap Name Team Expr2 Front/Back Event
    4/25/2012 B 16 Anthony 1 11 1 Wk 2
    4/25/2012 B 20 ByeB 11 12 1 Wk 2
    5/2/2012 B 16 Tom 9 10 2 $10 Tour
    5/2/2012 B 24 Tim 2 3 2 $10 Tour
    5/2/2012 B 21 Paul 6 7 2 $10 Tour



    First data row:
    Week 1 2 3 4 5 6 7 8 9 10 11 12 Front/Back Event CalcBonus Closest to Pin
    4/18/2012 1 2 3 4 5 6 7 8 9 10 11 12 2 Wk 1 No




  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    If you want to provide project so can test query with data, will look at. Follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Join Date
    Apr 2012
    Location
    Los Angeles
    Posts
    75
    So you are missing one row. Have you checked the Team column? Is there a value there for the 4/18/2012 record. I would run your query without the WHERE clause and see what your results are. The problem may be there.

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

Similar Threads

  1. Query input dates for range of dates in two fields
    By kagoodwin13 in forum Queries
    Replies: 3
    Last Post: 02-13-2012, 04:25 PM
  2. Language Issue in Access Query
    By somnath in forum Queries
    Replies: 2
    Last Post: 09-07-2011, 10:31 AM
  3. Query Issue in MS-Access
    By nrsanand in forum Queries
    Replies: 1
    Last Post: 02-15-2011, 01:34 PM
  4. Access 2007/Query issue
    By forrestapi in forum Access
    Replies: 8
    Last Post: 11-04-2010, 09:44 AM
  5. Replies: 0
    Last Post: 07-27-2009, 07:51 AM

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