Results 1 to 5 of 5
  1. #1
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664

    My output is differernt thta in the tutorials

    In the next tutorial shown at this link:

    http://www.functionx.com/access/Lesson30.htm

    My output after the sequence of steps now shown:

    Code:
    Practical Learning: Summarizing
    1. In the bottom section of the window, change the header of the second column to Qty: Category
    2. Click its Total combo box and select Count
    3. Change the header of the third column to Total Spent: Purchase Price
    4. Click its Total combo box and select Sum
    5. Change the header of the fourth column to Average: Purchase Price
    6. Click its Total combo box and select Avg
    7. Right-click the query and click SQL View SELECT [Company Assets].[Asset Type], Count([Company Assets].[Asset Type]) AS Qty, Sum([Company Assets].[Purchase Price]) AS [Total Spent], Avg([Company Assets].[Purchase Price]) AS Average FROM [Company Assets] GROUP BY [Company Assets].[Asset Type];
    1. In actually I got this for the SQL code :

      SELECT [Company Assets].Category,
      Count([Company Assets].Category) AS Qty,
      Sum([Company Assets].[Purchase Price]) AS [Total Spent],
      Avg([Company Assets].[Purchase Price]) AS [Avg]
      FROM [Company Assets]
      GROUP BY [Company Assets].Category;



      I followed the steps in the instructions (also shown above), but there must be something missing, my output is not the same.


      What am I doing wrong?


      Respectfully,



      Lou Reed

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    which is wrong?
    are you sure both data values are the same in your table and the example? (BEFORE the query)

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,641
    Looks like another error in this tutorial to me.

    Where it shows [Asset Type] in the SQL statement would be [Category] as shown in the design grid.
    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.

  4. #4
    Lou_Reed is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    1,664
    Well when I clicked datasheet view I got the same datasheet view as shown in the tutorial. So I guess the code
    is in some way correct.

    The only difference in my code is that I have Category where they have [Asset Type], yes it is more than one word so they use brackets.

    That is the only difference that I can see.

    Where in the design view do we put in Asset Type?

    R,

    Lou Reed

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,641
    You don't. That is not a field in the table. The tutorial errors in what it shows as SQL statement. The design grid is correct.
    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. VBA Tutorials
    By jmitchelldueck in forum Access
    Replies: 2
    Last Post: 07-17-2015, 03:50 PM
  2. Replies: 4
    Last Post: 04-23-2014, 04:35 PM
  3. Replies: 4
    Last Post: 12-30-2013, 05:51 PM
  4. Any good tutorials
    By data808 in forum Access
    Replies: 6
    Last Post: 10-19-2013, 02:29 PM
  5. Vba tutorials
    By Evgeny in forum Programming
    Replies: 1
    Last Post: 05-02-2010, 08:46 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