Results 1 to 2 of 2
  1. #1
    Join Date
    May 2011

    Unanswered: VBA string with OR expression

    Hi there,

    I have a search command button on my form. At the moment on click it will show all jobs 'In Progress', the code I have written works and is as follows:

    Private Sub Search_Click()

    Search_String = "[Status]= 'In Progress'"

    DoCmd.ApplyFilter , Search_String

    End Sub

    I would like this button to also bring up all jobs that are 'On Hold'.
    This is probably really simple but I have tried quite a few combinations and I am getting errors. Could someone please help me??

  2. #2
    Join Date
    Jun 2005
    Richmond, Virginia USA
    Provided Answers: 19
    I'm not positive about this, but try using

    Search_String ="Status IN('In Progress','On Hold')"

    Linq ;0)>
    Hope this helps!

    The problem with making anything that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

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