I was wondering if someone could try and help me out, i have been at my wits end the last few days trying to get this to work and it just keeps returning mismatch errors.
Basically what i want to do is construct a IF ELSE statement with values that i have dynamically grabbed from a database and also values that are hard coded into the script, below is the code:
CheckSub1="Chris Rates for 12 months"
CheckSub2="Bob Rates for 6 months"
Dim S, O
Set ssGetRows = Server.CreateObject("ADODB.Recordset")
ssGetRows.Open "rates", dbGlobal
If ssGetRows.BOF and ssGetRows.EOF Then
S = " Then"
While Not ssGetRows.EOF
S = " cItem.Description = " & ssGetRows("name") & " rates for 6 months OR cItem.Description = " & ssGetRows("name") & " rates for 12 months "
If ssGetRows.EOF then
O = "OR"
S = S & O
if cItem.Description = CheckSub1 OR cItem = CheckSub2 OR S then
'Do something else
When i do run this, i get a
Type Mismatch: '[string: " cItem.Descripti"]'
on the line that has the if statement.
Please someone help me, i just cant seem to get it going, im desperate.