cedent
asked on
I receive 'Type Mismatch' when entering date range on calendar.
I have a calendar that is working fine on another server. I copied the entire calendar over to a new location with the hope of just modifying the names and implementing for another manager. I copied it over, tried to enter a date range and received 'Type Mismatch'. I hit ok. I save and nothing shows on the calendar.
****ON THE EDCHANGE - FORM THERE IS A STARTDATE:
Sub Exiting(Source As Field)
Dim ws As New NotesUIWorkspace
Dim src As NotesUIDocument
Set src= ws.CurrentDocument
If oldenddate= src.FieldGetText("EndDate" ) Then
oldenddate= src.FieldGetText("StartDat e")
Call src.FieldSetText("EndDate" , oldenddate)
Else
oldenddate= ""
End If
End Sub
****THERE IS ALSO AND ENDING DATE:
Sub Exiting(Source As Field)
End Sub
****THERE IS ALSO CALDAYS (STATIC TEXT):
@If(StartDate!=NULL;(@Abs( @Integer(( EndDate - StartDate) / (86400)))+1);"")
****THIS IS THE FORM THAT I AM ATTEMPTING TO ADD A DATE RANGE TO AND RECEIVE THE TYPE MISMATCH.
****I have very sproadic use of Lotus Notes so please, please be clear with your answers, i'll increase points.
****ON THE EDCHANGE - FORM THERE IS A STARTDATE:
Sub Exiting(Source As Field)
Dim ws As New NotesUIWorkspace
Dim src As NotesUIDocument
Set src= ws.CurrentDocument
If oldenddate= src.FieldGetText("EndDate"
oldenddate= src.FieldGetText("StartDat
Call src.FieldSetText("EndDate"
Else
oldenddate= ""
End If
End Sub
****THERE IS ALSO AND ENDING DATE:
Sub Exiting(Source As Field)
End Sub
****THERE IS ALSO CALDAYS (STATIC TEXT):
@If(StartDate!=NULL;(@Abs(
****THIS IS THE FORM THAT I AM ATTEMPTING TO ADD A DATE RANGE TO AND RECEIVE THE TYPE MISMATCH.
****I have very sproadic use of Lotus Notes so please, please be clear with your answers, i'll increase points.
Q: Are the two servers running the same date format ie dd/mm/yyyy or is one running mm/dd/yyyy it sounds like you have date format issues as you have copied the data across
You declared oldenddate as String? Of course, you use Option Explicit/Declare...
ASKER
sg405222 - i'll check.
sjef - ? what do you mean?
sjef - ? what do you mean?
I assume you declared oldenddate somewhere, on a global level?
Did you try running this with the Debugger on? It'll tell you straightaway where the error is.
Did you try running this with the Debugger on? It'll tell you straightaway where the error is.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
By errors I mean errors at compile time (When you save the code) which is the good time to have errors instead of at runtime.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
True that would absolutely cause a type mismatch, and slick! that looks better :)
ASKER
Sorry for not responding, I was out of the office and swampped immediately before leaving. I completely neglected this. Again apologies.
Running the debugger helped identify where the issue was. It took me to a completely different area and I commented that code out. That fixed the problem. I'd like to split 250 point between behenderson and sjef. How can i do that.
Running the debugger helped identify where the issue was. It took me to a completely different area and I commented that code out. That fixed the problem. I'd like to split 250 point between behenderson and sjef. How can i do that.
Thank you cedent. I am very happy to hear you got your issue fixed and am completely satisfied with sjef getting the points. I have stolen a point or 2 from him in the past.
I'd be happy to steal them back again some day! ;-))
Happy New Year!
Happy New Year!
I'm always happy when I can give the illusion of humility while still getting the points. 8)
Happy New Year to you too!
Happy New Year to you too!
ASKER
Thanks all - splitting now.