MS Access Query with Distinct Column field Selection

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bbcdancer@hotmail.com

    MS Access Query with Distinct Column field Selection



    1. MS ACCESS COMBO LIST = JAN;FEB;MAR;APR ;MAY;
    -----------------------------------

    2. DATA TABLE:
    N1 | N2 | N3 | JAN | FEB | MAR | APR | MAY |
    --------------------------------------------
    a1 | a2 | a3 | 1 | 2 | 3 | 4 | 5 |
    b1 | b2 | b3 | 10 | 20 | 30 | 40 | 50 |
    c1 | c2 | c3 | 11 | 22 | 33 | 44 | 55 |



    3. COMBO LIST SELECTION = FEB (Parameter may vary could be any column
    fields from JAN to DEC)

    4. RESULTS TABLE:

    N1 | N2 | N3 | FEB |
    --------------------
    a1 | a2 | a3 | 2 |
    b1 | b2 | b3 | 20 |
    c1 | c2 | c3 | 22 |


    5 Is this RESULTS table possible in MS Access along with the combo
    option?
  • Salad

    #2
    Re: MS Access Query with Distinct Column field Selection

    bbcdancer@hotma il.com wrote:
    >
    1. MS ACCESS COMBO LIST = JAN;FEB;MAR;APR ;MAY;
    -----------------------------------
    >
    2. DATA TABLE:
    N1 | N2 | N3 | JAN | FEB | MAR | APR | MAY |
    --------------------------------------------
    a1 | a2 | a3 | 1 | 2 | 3 | 4 | 5 |
    b1 | b2 | b3 | 10 | 20 | 30 | 40 | 50 |
    c1 | c2 | c3 | 11 | 22 | 33 | 44 | 55 |
    >
    >
    >
    3. COMBO LIST SELECTION = FEB (Parameter may vary could be any column
    fields from JAN to DEC)
    >
    4. RESULTS TABLE:
    >
    N1 | N2 | N3 | FEB |
    --------------------
    a1 | a2 | a3 | 2 |
    b1 | b2 | b3 | 20 |
    c1 | c2 | c3 | 22 |
    >
    >
    5 Is this RESULTS table possible in MS Access along with the combo
    option?
    You didn't specify how you wanted to play/display the data.

    Dim s as string
    s = "Select N1, N2, N3, " & Me.ComboList & " From DataTable"


    You could then make the above a report/form's recordsource (tho you'd
    need to modify the textbox name for the month). You could open it as a
    recordset. You could create a querydef with it.

    Golly

    Comment

    Working...