Verify character is in string

Purdue2479

Registered User.
Local time
Today, 17:56
Joined
Jul 1, 2003
Messages
52
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
 
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.
 
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.
 
Try:
Select * FROM YourTable
WHERE (InStr([YourField],"(") <> 0) AND (InStr([YourField],")") = 0)
...using your Table and Field names of course.
 
You're welcome. Thanks for posting back with your success.
 

Users who are viewing this thread

Back
Top Bottom