Solved

Q_21877553.html - type mismatch error

Posted on 2006-06-13
9
221 Views
Last Modified: 2013-12-18
Hi Marko, everyone

I can't seem to get rid of type mistmatch error on the following line:

newList = Replace( oldList, MakeArray( fromDate ), MakeArray( toDate ) )

Tried not to declare newlist, hoping this will resolve the problem(no luck)
Tried to convert newlist to date value before setting it to form date field(no luck)

What can I do next??


      
0
Comment
Question by:varvoura
  • 5
  • 3
9 Comments
 
LVL 22

Accepted Solution

by:
mbonaci earned 250 total points
ID: 16894148
Hi varvoura,
did you put MakeArray at Globals level of view's code?
Did you use the exact code I posted?

I tested it again and it's working fine (what version are you on?).

Hope this helps,
Marko
0
 

Author Comment

by:varvoura
ID: 16894358
Marko,

Version 6.5
I placed the code as is
I now moved Make Array to the global section of the view under declaration, but still no luck. Everytime I try to drag and drop, I get the type mismatch error on the line I sent earlier and the calendar entry stays in its original spot.

Something is going crazy here, but I am not sure what it is.
As I said, I used the debugger, still no help

Sorry!!
0
 
LVL 46

Assisted Solution

by:Sjef Bosman
Sjef Bosman earned 250 total points
ID: 16894507
Does oldList exist? Is it an array?
0
 

Author Comment

by:varvoura
ID: 16894582
Marko, can you also clarify something for me:

At the moment, I have the following code to prompt before the drag and drop operation
(I've commented this out for now)

If Messagebox (Source.CalendarDateTime & Chr(13) & _
      Source.CalendarDateTimeEnd, _
      MB_YESNO + MB_ICONQUESTION, _
      "Is this the correct date where you want to move your test") = IDYES Then
            Continue = True
      Else
            Continue = False
      End If

this is to prompt with the date change.

Now I want to change it as follows so that it prompts user (YesNo) whether or not they wish to change all the subsequent test date for that specific product because of this date change. If they click "Yes" then change all the test date according to this one. If not, just leave all the other test entries as they are and only change this one.
There was an idea put down that this prompt (YesNo) should be based on a certain percentage of interval field but i am not sure how feasible is that.
For example,

If I have 10 test dates for a certain product, producta, with intervals of 120 days between those days. If I shift one of those dates 1 or 2 days forward or backward, then this is a small percentage of the interval and I shouldn't have to prompt to change all other entries, if however, the interval is 100 days and i shift this test 10 days forward then that's 10% of interval which is quite high and I should be prompt to whether or not all other non completed test entries should also move forward.
So it is based on percentage of interval.
The bad trick with this is that the testdates array always has all the testdates in it, whether completed or not and I'll have to be careful when I shift dates forward not to shift those completed ones so that they're rescheduled for testing again.

See the things that I have to do with my new job which I've only just started!!!!

Anyway, a bit of clarification on the above process will be great.




0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:varvoura
ID: 16894596
Hi sjef, yes oldlist exists and when I run the debugger, i can see all the dates populating correclty in oldlist

not sure what's causing this one!
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 16894750
Then try

    Dim fromList As Variant
    Dim toList As Variant
   
    fromList= MakeArray( fromDate )
    toList= MakeArray( toDate )
   
    newList = Replace( oldList, fromList, toList )

and use the debugger

0
 

Author Comment

by:varvoura
ID: 16894826
Tried that, it crashes my lotus notes each time I try to drag an entry
NSD.....
0
 
LVL 46

Expert Comment

by:Sjef Bosman
ID: 16894978
Ah, I love those :) Then step through your code until you arrive at the statement it crashes on. Or set breakpoints when you think you can skip a lot of code.
0
 

Author Comment

by:varvoura
ID: 16895026
That same line, whether setting newlist this way or Marko's way, still creating problems.
Marko's code throws type mismatch his newlist line and your newlist line causes NSD error

newList = Replace( oldList, fromList, toList )

said earlier, oldlist has values in it.
Would it have anything to do with the data type the that the date field on the document has?



0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now