Solved

Q_21877553.html - type mismatch error

Posted on 2006-06-13
9
223 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Missing Rules 1 300
Lotus Notes, Agent - installation / distrubtion of a agent into mail db 7 232
Lotus Domino 9 web server 6 90
Lotus notes - Follow up notes mail missing 15 72
For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

776 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