Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2002
    Posts
    33

    Unanswered: Crosstab in Access

    I have the following crosstab:

    PARAMETERS [Forms]![frmData]![txtBeginDate] DateTime, [Forms]![frmData]![txtCloseDate] DateTime;
    TRANSFORM Sum(tblWork.Quantity) AS SumOfQuantity
    SELECT tblWork.ID, tblWork.Place
    FROM tblWork
    WHERE ((tblWork.DateAct) Between [Forms]![frmData]![txtBeginDate] And [Forms]![frmData]![txtCloseDate])
    GROUP BY tblWork.ID, tblWork.Place
    PIVOT tblWork.[Type_OF_Operation];

    Now the problem:
    If I don't have data in the field Type_OF_Operation the crosstab does not return something. How do I pass this problem. (I tried with IIF ([Type_OF_Operation] Is Null;0;.....) function but nothing.

    Can anybody help me?

    Thanks!
    PacuIonut

  2. #2
    Join Date
    Jul 2002
    Posts
    4
    Have you tried using the nz function to pass a value to the field if it is null?

    PIVOT nz([tblWork].[Type_OF_Operation],"Null");

  3. #3
    Join Date
    Jun 2002
    Posts
    33
    Thanks tstaab, but the NZ function does not work.
    PacuIonut

  4. #4
    Join Date
    Jun 2002
    Posts
    33
    Thanks tstaab, but the NZ function does not work.
    PacuIonut

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •