Hi,
I have a script, to access a view, and to heck the values of column 8 of the view.
…
Set oView = oDb.GetView(“By Student Code”)
Set oStudentViewEntry = oView.GetEntryByKey(Clng(oStudentCode))
oSTudentViewEntry.ColumnValues(8)
…
If (Arraygetindex(oSTudentViewEntry.ColumnValues(8),“Swimming”)>=0) Then
Messagebox "Yes, he likes Swimming!"
End If
Column 8 is taking values from a CheckBox field called “HOBBY”, allowing multiple values.
WHen I run the script, if that column has more than 1 values e.g. “Swimming”,“Reading”. Then it works fine.
But if the column 8 contain No values or just 1 Value, then it comes out with “TYPE MISMATCH” error!
I have cracked my head, trying different ways to avoid, but to no avail. Hope someone can give me some tips.
THank You.