Solved

Q_21877553.html - type mismatch error

Posted on 2006-06-13
9
224 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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
 

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

839 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