DanLotusNotes
asked on
Type Mismatch errors !!
Hello !!
This is a part my program. I got errors because I try to compare two date fields. Please help me if you know how to correct it. Thanks
Set rtitem = New NotesRichTextItem(superdoc , "Body2")
Set caview = db.GetView( "Misc Super" )
Set cadoc = caview.GetFirstDocument
While Not (cadoc Is Nothing)
If cadoc.Form(0) = "AccCardResult" Then
If tmpcode = cadoc.code(0) Then
cc = cadoc.NumRepair(0)
If Not Isnumeric(cc) Then
cc = 0
End If
If cadoc.SelRepairAccessDates (0) = cadoc.AccessDeadline(0) Then msg = "Deadline"
Else
msg = "Access Date"
End If
txtaccdate = ""
If Isdate(cadoc.AccessDeadlin e(0)) Then
txtaccdate = Str(cadoc.AccessDeadline(0 ))
Else
txtaccdate = cadoc.AccessDeadline(0)
End If
Call rtitem.AppendText( txtaccdate+" Apt: "+cadoc.AptNo(0)+" - "+cadoc.tenant(0)+", "+msg+" - "+Str(cc)+" Repair(s)")
Call rtitem.AddNewline( 1 )
End If
End If
Set cadoc = caview.GetNextDocument( cadoc )
Wend
This is a part my program. I got errors because I try to compare two date fields. Please help me if you know how to correct it. Thanks
Set rtitem = New NotesRichTextItem(superdoc
Set caview = db.GetView( "Misc Super" )
Set cadoc = caview.GetFirstDocument
While Not (cadoc Is Nothing)
If cadoc.Form(0) = "AccCardResult" Then
If tmpcode = cadoc.code(0) Then
cc = cadoc.NumRepair(0)
If Not Isnumeric(cc) Then
cc = 0
End If
If cadoc.SelRepairAccessDates
Else
msg = "Access Date"
End If
txtaccdate = ""
If Isdate(cadoc.AccessDeadlin
txtaccdate = Str(cadoc.AccessDeadline(0
Else
txtaccdate = cadoc.AccessDeadline(0)
End If
Call rtitem.AppendText( txtaccdate+" Apt: "+cadoc.AptNo(0)+" - "+cadoc.tenant(0)+", "+msg+" - "+Str(cc)+" Repair(s)")
Call rtitem.AddNewline( 1 )
End If
End If
Set cadoc = caview.GetNextDocument( cadoc )
Wend
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
NotesItem.Type would specify the data type of the field. Check help documentation !
ASKER
Thanks for your help :)
ASKER
If cadoc.SelRepairAccessDates
I think this line create an error, because when I remove, it works.
DO you know any Syntax uses to check type of DATE.