Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2003
    Posts
    3

    Unanswered: Verify character is in string

    I need a query to search each record in a field for an open parenthesis and verify that there is a closing paenthesis. If there is no closing parenthesis, then I need it to return the records not meeting this criteria. I am not very strong in VBA and would appreciate an example function. Thanks

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    You don't need VBA. In the query:

    WHERE InStr([FieldName],"(")=True AND InStr([FieldName],")")=False;
    Paul

  3. #3
    Join Date
    Dec 2003
    Location
    Colorado
    Posts
    24
    This one counts the number of instances of '(' and ')' returning the records that do not have an equal count.

    WHERE (len(replace([FieldName],")",""))-len(replace([FieldName],"(","")))<>0
    Last edited by xburrows; 09-12-07 at 19:43.
    Ray Burrows

Posting Permissions

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