Forums

This topic is locked

Conditional Region (condition)

Posted 27 Sep 2002 15:29:06
1
has voted
27 Sep 2002 15:29:06 Carsten Hansen posted:
Hi,
I am using "Conditional Region 2.0" i need to compare database fields.

Eks.
Field1 contain "house"
Field2 contain "garden, house"

field1 must equal field2 because it contains "house"

Is it possible to use the Like condition ?


Replies

Replied 28 Sep 2002 20:09:07
28 Sep 2002 20:09:07 Owen Eastwick replied:
You can't use LIKE in VBScript, here's how you could do it:

<%
varField1 = Cstr(rsName.Fields.Item("Field1".value)
varField2 = Cstr(rsName.Fields.Item("Field2".value)

If InStr(varField2, varField1) <> 0 Then
WHATEVER
End If
%>

Regards

Owen.

Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo

Reply to this topic