Dim sClause As String
sClause = "CONSTIT_RELATIONSHIPS.ID in (SELECT CONSTIT_RELATIONSHIPS.ID " & _
"FROM CONSTIT_ADDRESS INNER JOIN " & _
"ADDRESS ON CONSTIT_ADDRESS.ADDRESS_ID = ADDRESS.ID INNER JOIN " & _
"CONSTIT_RELATIONSHIPS ON CONSTIT_ADDRESS.ID = CONSTIT_RELATIONSHIPS.CONSTIT_ADDRESS_ID INNER JOIN " & _
"RECORDS ON CONSTIT_RELATIONSHIPS.RELATION_ID = RECORDS.ID " & _
"WHERE (ADDRESS.CITY = 'Charleston') AND (RECORDS.FIRST_NAME = 'Amy'))"
Dim oRels As CIndividuals2
Set oRels = New CIndividuals2
oRels.Init REApplication.SessionContext, , tvf_Ind2_CustomWhereClause, sClause
Disclaimer: We provide programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes you are familiar with Microsoft Visual Basic and the tools used to create and debug procedures. Our Customer Support can help explain the functionality of a particular procedure, but we will not modify, or assist you with modifying, these examples to provide additional functionality. If you are interested in learning more about the VBA and API modules, contact your account manager.