Results 1 to 10 of 10
  1. #1
    Andyjones is offline Advanced Beginner
    Windows Vista Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    76

    Database help


    Please could some one take a look at this and see if they can get it to work it should be easy to see what i am trying to do and any improvements on this or the other database please feel free to make them links below.

    http://www.box.com/s/olsu457f3eqalhvocvl4

    http://www.box.com/s/6uyexcp3bj0p5glvn678

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    What do you mean by 'get it to work'. The Langley database is extensively developed. What issue(s) need to be addressed?

    Why does Database2 have two tables for team names?
    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
    Andyjones is offline Advanced Beginner
    Windows Vista Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    76
    Database 2 has two tables because im trying to create a home form and away match form for entering the data as thus speeds the process up. in the langley database i have to enter each player scores in idividualy im trying to change that in database 2 by having a form that looks like a score card so its quicker to enter the information.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    What is specific issue you have encountered? And 'I don't know what to do next' is not specific. You have tables built - next is build forms.
    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.

  5. #5
    Andyjones is offline Advanced Beginner
    Windows Vista Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    76
    I have a relationship set up between the tables, and if you look some data has already been added, test data.

    What I am trying to do is get the relationship to work correctly so that the player averages query adds up each players indivudial data to produce a league table like langley b database.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    As long as both tables have all the same players, can join them on players. Don't need the CopyOfTeamNames. Try:

    Sunday Averages
    SELECT [Sunday Results].[Team Name], [Sunday Results].[Player Name], Sum(Abs([Played Home]+[Played Away])) AS Played, Sum(Abs([Won Home]+[Won Away])) AS Won, Sum(Abs([Lost Home]+[Lost Away])) AS Lost, Sum(Nz([Score 1],0)+Nz([Score 3],0)) AS [For], Sum(Nz([Score 2],0)+Nz([Score 4],0)) AS Against, Sum(Nz([Score 1],0)+Nz([Score 3],0)-(Nz([Score 2],0)+Nz([Score 4],0))) AS [+/_], Sum(Nz([points Away],0)+Nz([Points Home],0)) AS Points
    FROM [Sunday Away] INNER JOIN ([Team Names] INNER JOIN [Sunday Results] ON [Team Names].[Team Name] = [Sunday Results].[Team Name]) ON [Sunday Away].[Player Name] = [Sunday Results].[Player Name]
    GROUP BY [Sunday Results].[Team Name], [Sunday Results].[Player Name]
    ORDER BY Sum(Nz([Score 1],0)+Nz([Score 3],0)-(Nz([Score 2],0)+Nz([Score 4],0))) DESC , Sum(Nz([points Away],0)+Nz([Points Home],0)) DESC;

    Then the ranking query appears to work.
    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.

  7. #7
    Andyjones is offline Advanced Beginner
    Windows Vista Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    76

    help continued

    pls demonstrate an example of what you have typed up. Also i want to create a form form that looks like the match card layout in langley b averages but i want a single form with a continous form feel. ie each 1 record with multipul entries per match,then when you click on add new record ur shown blank fields ready 4 u to enter the next batch of data.


    Example

    Team Name Date of Game

    Player Name Played home Won Home Lost Home Points
    tom
    dick
    harry
    sue

    (1 record with continous entries)

    if you could do example of this i can adapt it 4 my own needs.

    thanks 4 ur help so far

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    Just copy/paste the SQL statement into the SQL View window of the query designer. Access Help has guidelines on building aggregate queries (GROUP BY).

    Then why don't you just import the form from Langley and edit it as needed - change the RecordSource? I am not going to build your project.
    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.

  9. #9
    Andyjones is offline Advanced Beginner
    Windows Vista Access 2010 32bit
    Join Date
    Sep 2011
    Posts
    76

    follow up

    How would i get this to work if players in both tables were different as not all the same players would play each week the team would change depending on which players were avaliable

  10. #10
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    The members playing on a team would not be the same each week? For this particular query, doesn't seem to matter. And on second look the Team Names table doesn't need to be in the query.

    The way tables set up can't be more than one record per team in the Team Names table. Is this intended?
    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.

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

Similar Threads

  1. Database Design for Specification Database
    By khwaja in forum Database Design
    Replies: 2
    Last Post: 11-24-2011, 03:58 AM
  2. Replies: 20
    Last Post: 08-08-2011, 01:34 PM
  3. Replies: 3
    Last Post: 05-15-2011, 10:52 PM
  4. Replies: 1
    Last Post: 11-03-2010, 10:41 AM
  5. Replies: 4
    Last Post: 08-12-2010, 08:38 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