Solved

Q_21877553.html - type mismatch error

Posted on 2006-06-13
9
228 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

729 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