Purdue2479
09-10-2007, 07:54 PM
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
The_Doc_Man
09-10-2007, 09:06 PM
Read up on InStr() and Len() functions. You want to find a case where the string is not of length zero and neither is InStr of the parenthesis. Read the Access Help. It includes examples for you to look at.
Purdue2479
09-11-2007, 05:38 AM
I read the examples in the help, but I'm still don't understand how to go about writing the expression/function. Any help would be appreciated.
RuralGuy
09-11-2007, 07:14 AM
Try:
Select * FROM YourTable
WHERE (InStr([YourField],"(") <> 0) AND (InStr([YourField],")") = 0)
...using your Table and Field names of course.
RuralGuy
09-11-2007, 02:03 PM
You're welcome. Thanks for posting back with your success.