I seem to be writing this statement wrong

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • favor08
    New Member
    • Jan 2007
    • 56

    I seem to be writing this statement wrong

    this is within the control source of a checkbox called Yes:

    Code:
    =IIf([PrgrmCd]="033" Or "035",True,False)
    and this is within the control source of a checkbox called No:
    Code:
    =IIf([PrgrmCd]="033" Or "035",False,True)
    when I open the report the yes checkbox is true for every report and I know that it shouldn't be. there are only 10 that have the codes 033 or 035 and should have a yes check mark the others should have "True" for the No checkbox
  • ADezii
    Recognized Expert Expert
    • Apr 2006
    • 8834

    #2
    Originally posted by favor08
    this is within the control source of a checkbox called Yes:

    Code:
    =IIf([PrgrmCd]="033" Or "035",True,False)
    and this is within the control source of a checkbox called No:
    Code:
    =IIf([PrgrmCd]="033" Or "035",False,True)
    when I open the report the yes checkbox is true for every report and I know that it shouldn't be. there are only 10 that have the codes 033 or 035 and should have a yes check mark the others should have "True" for the No checkbox
    [CODE=vb]
    'Assuming PrgrmCd values are Strings and not numbers
    =IIf([PrgrmCd]="033" Or [PrgrmCd]="035",True,Fal se)
    [/CODE]

    Comment

    Working...