Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Zero (0) values not showing in query result

  1. #1
    New Member
    Join Date
    Oct 2018
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Zero (0) values not showing in query result

    I have made a query based on comoboxes and checkboxes. One of the checkboxes is chkExternal. When it's checked I want all the scores from all employees to appear: Internal + External Employees, or 0 en -1 values. When it's not checked I want only 0 values to appear: only Internal.

    This is the full SQL:

    SELECT dbo_tblScore.Competence_Knowledge, dbo_tblEmployee.Name, dbo_tblScore.Score, dbo_tblEmployee.External


    FROM (((dbo_tblScore INNER JOIN dbo_tblCompetence_Profile ON dbo_tblScore.Competence_Profile_ID = dbo_tblCompetence_Profile.Competence_Profile_ID) INNER JOIN dbo_tblLink_Employee_Function ON dbo_tblCompetence_Profile.Link_Employee_Function_ID = dbo_tblLink_Employee_Function.Link_Employee_Function_ID) INNER JOIN dbo_tblEmployee ON dbo_tblLink_Employee_Function.Employee_ID = dbo_tblEmployee.Employee_ID) INNER JOIN dbo_tblCategory ON dbo_tblScore.Category_ID = dbo_tblCategory.Category_ID


    WHERE (((IIf(IsNull([Forms]![frmExportReport]![cmbFilter_Team]),True,[Forms]![frmExportReport]![cmbFilter_Team]=[dbo_tblCompetence_Profile].[Team_ID]))<>False) AND ((IIf(IsNull([Forms]![frmExportReport]![cmbFilter_Functie]),True,[Forms]![frmExportReport]![cmbFilter_Functie]=[dbo_tblScore].[Function_ID]))<>False) AND ((IIf(IsNull([Forms]![frmExportReport]![cmbFilter_CategoryType]),True,[Forms]![frmExportReport]![cmbFilter_CategoryType]=[dbo_tblCategory].[CategoryType_ID]))<>False) AND ((IIf(IsNull([Forms]![frmExportReport]![cmbFilter_Category].[Value]),True,[Forms]![frmExportReport]![cmbFilter_Category]=[dbo_tblCategory].[Category_ID]))<>False))
    GROUP BY dbo_tblScore.Competence_Knowledge, dbo_tblEmployee.Name, dbo_tblScore.Score, dbo_tblEmployee.OutOfService, dbo_tblEmployee.Internal
    HAVING (((dbo_tblEmployee.OutOfService)=IIf([Forms]![frmExportReport]![chkOutOfService]=True,-1,0)) AND ((dbo_tblEmployee.External)=IIf([Forms]![frmExportReport]![chkExternal]=True,([dbo_tblEmployee].[External]) Is Not Null,0)))
    ORDER BY dbo_tblEmployee.Name;

    The part where I'm talking about:
    ((dbo_tblEmployee.External)=IIf([Forms]![frmExportReport]![chkExternal]=True,([dbo_tblEmployee].[External]) Is Not Null,0))

    I have tried to replace 'Is Not Null' by 'Like ("*")', Not is null, '<1', '>-2',... I ran out of options... Any more ideas?

    Thanks guys!

  2. #2
    New Member
    Join Date
    Oct 2018
    Posts
    26
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Zero (0) values not showing in query result

    FOUND THE SOLUTION!

    WHERE (((IIf([Forms]![frmExportReport]![chkInternal]=True,True,[dbo_tblEmployee].[Internal]=True))<>False)

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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