Hi,
Is there a way I can change the following code so that when the user enters ‘Bill Clinton’, the agent will replace it with ‘Bill%Clinton’.
The following will replace each space found with ‘%’ and the SQL will not recognise the query, when it’s ‘Bill%%Clinton’. I’ve just starting using LotusScript, so I’m not very familiar with how to use the commands in it.
Dim sName As String, chkSpc As String, posSpc As Long
sName = Trim(doc.SearchName(0))
chkSpc$ = " "
posSpc = Instr(sName, chkSpc)
If posSpc <> 0 Then
Mid$(sName, posSpc) = "%"
End If