Link to home
Start Free TrialLog in
Avatar of DanLotusNotes
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.AccessDeadline(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    
         
ASKER CERTIFIED SOLUTION
Avatar of HemanthaKumar
HemanthaKumar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DanLotusNotes
DanLotusNotes

ASKER

Thanks for your fast answer.


If cadoc.SelRepairAccessDates(0) = cadoc.AccessDeadline(0)

I think this line create an error, because when I remove, it works.  
DO you know any Syntax uses to check type of DATE.
NotesItem.Type would specify the data type of the field. Check help documentation !
Thanks for your help :)