Results 1 to 2 of 2
  1. #1
    hehrerh is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    May 2017
    Posts
    35

    Help with an OpenReport Where Condition

    Hey! Quick question.

    I am trying to display a report with the following conditions:

    1. The engineering firm matches a combobox selection
    2. [isLeaveOffENgReport] = 1
    3. [TaskStatusID] = 1 OR 2

    I have come up with this Where Condition but it does not work. What should I change? I think the problem is related to how I addressed the TaskStatusID condition.

    ="[EngineeringFirmID]=" & Nz([cboEngineerReport],0) & " AND [isLeaveOffEngReport]= 1" & " AND [TaskStatusID]= 1 OR 2"

    Thank you!


    Howie

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    Do you get an error msg and number?

    I don't know your details but you could try (untested)



    ="[EngineeringFirmID]=" & Nz([cboEngineerReport],0) & " AND [isLeaveOffEngReport]= 1 AND ([TaskStatusID]= 1 OR [TaskStatusID]= 2)"

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 7
    Last Post: 10-24-2012, 05:22 PM
  2. DoCmd.OpenReport WHERE condition
    By bidbud68 in forum Programming
    Replies: 16
    Last Post: 10-19-2012, 05:31 AM
  3. OpenReport WHERE Condition Not Working
    By altemir in forum Reports
    Replies: 1
    Last Post: 02-17-2012, 09:58 AM
  4. Replies: 3
    Last Post: 11-19-2010, 01:48 PM
  5. DoCmd OpenReport ... where condition with a Like
    By Grooz13 in forum Programming
    Replies: 4
    Last Post: 08-31-2010, 09:04 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums