Results 1 to 2 of 2
  1. #1
    snoopy2003 is offline Advanced Beginner
    Windows 7 64bit Access 2010 32bit
    Join Date
    Feb 2011
    Posts
    72

    Horizontal to Vertival

    Hello,



    I have a table with the following filed:

    Product Family = A
    Year = 2010
    Q1 = 10
    Q2 = 20
    Q3 = 30
    Q3 = 40

    I wish to write a query which returns values in rows:

    Q1 - Sum Q1 Values
    Q2
    Q3
    Q4


    Instead of : Q1 Q2 Q3 Q4

    How can I do it ?

    Thank you for your help

  2. #2
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    The first thing I would do is normalize your table structure. Right now, you are "committing spreadsheet". The following is the way I would design the table:
    Field Names
    -----------------
    ProductFamily
    P_Year
    Amount
    P_Quarter (Q1,Q2,Q3 or Q4)
    Using this structure, it would be easy to construct a query to get the results you want.


    Also, "Year" is a reserved word (and a function) in Access and shouldn't be used as object names. Here is a list of reserved word in Access:

    http://allenbrowne.com/AppIssueBadWord.html

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

Similar Threads

  1. Horizontal DB convert
    By williamtak in forum Access
    Replies: 2
    Last Post: 12-09-2010, 08:05 PM
  2. Control of horizontal scroll bar
    By smthomer in forum Programming
    Replies: 3
    Last Post: 08-25-2010, 10:52 AM
  3. Horizontal Fields
    By labadee in forum Access
    Replies: 1
    Last Post: 06-27-2010, 09:22 PM
  4. Horizontal text alignment
    By jamil_kwi in forum Reports
    Replies: 2
    Last Post: 06-02-2010, 11:50 PM
  5. Horizontal listbox - ?
    By bane in forum Forms
    Replies: 3
    Last Post: 04-20-2010, 06:48 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