I have created a calendar check button, this button check if a meeting has been scheduled on the current Lotus Notes Calendar, the button is on the CRM
Please find the code below:Sub Click(Source As Button)
Dim s As NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim view As NotesView
Dim doc As notesdocument
Set s = New NotesSession
Set db = s.GetDatabase("","")
Set view =db.GetView( "lookupCalendarDates")
Set dc = view.GetAllDocumentsByKey(Today)
If Not (dc Is Nothing) Then
Set doc = view.GetFirstDocument
If(StartTime >= EndTime) And (EndTime <= StartTime) Then
Msgbox "Calendar Time cannot be booked"
Else
If (EndTime >= StartTime) And (StartTime <= EndTime) Then
Msgbox "Calendar Time is booked"
Exit Sub
End If
End If
End If
End Sub
what this code does it get to the first if statement and does not loop to the second statement to check if the time is available or not
Thank you for the suggetion I tried it, and it still didn’t give me an output.
Right now I’m trying to use the calendar check code that is used on the Mail template, but it gives me the following error: Invalid or non existent document.
Please look at the code below one is the R7 version and the other is an R8 Version.