Checkbox on form to change query result

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tuxalot
    New Member
    • Feb 2009
    • 200

    Checkbox on form to change query result

    I have a checkbox on a form. When checked, I want my report query to change FirstName LastName to "Privacy Case". Report shows employee injury data with each employee representing a line on the report. Other non-privacy cases will also appear on the same report.

    Example:

    John Smith Accounting Injury data here...
    Privacy Case Engineering Injury data here...
    Sara Jones Kitchen Injury data here...

    Using Access 2007. Any help is appreciated.
  • Dan2kx
    Contributor
    • Oct 2007
    • 365

    #2
    What about:

    Code:
    IIf(checkbox=false,[Surname],'Privacy Case')

    Comment

    • tuxalot
      New Member
      • Feb 2009
      • 200

      #3
      Along the same line of thinking, I was going to try this:

      =IIf([checkbox]=-1,"Privacy",[FirstName])

      =IIf([checkbox]=-1,"Case",[LastName])

      Looks like it may work.

      Thanks for the info. Dan2kx!

      Comment

      Working...