Link to home
Start Free TrialLog in
Avatar of cedent
cedentFlag for United States of America

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("StartDate")
            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.


Avatar of sg405222
sg405222

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

Avatar of Sjef Bosman
You declared oldenddate as String? Of course, you use Option Explicit/Declare...
Avatar of cedent

ASKER

sg405222 - i'll check.
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.
SOLUTION
Avatar of behenderson
behenderson
Flag of United States of America image

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
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
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
ASKER CERTIFIED SOLUTION
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
True that would absolutely cause a type mismatch, and slick! that looks better :)
Avatar of cedent

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.  
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!
I'm always happy when I can give the illusion of humility while still getting the points. 8)

Happy New Year to you too!
Avatar of cedent

ASKER

Thanks all - splitting now.