The value entered into the column by the user is a text value. Even though the value may have been a date/time before the user started to edit it, they can type any characters into the cell, so a modified column value is given to you as text, even if it's text that happens to look like a date. Your code in the Inviewedit event must convert the value to the desired datatype, in this case date/time. There are a couple of ways you could do this:
- Declare a New Notesdatetime object and give it the value entered into the column as an initializer.
- After assigning fields, call ComputeWithForm method to adjust all fields to their correct datatypes.
Incidentally, the QUERY_REQUEST event is not "reserved", you can certainly use it, and it's very handy. For instance, you could put code in there so that when the user tries to edit a date column, instead of just letting them type anything they like, you could pop up a date picker dialog. Or for a keyword field, you can pop up a list of keyword choices instead of just letting the user enter any value.
Also, I suggest you don't bother to fetch the current document before seeing what event you're processing. It's a waste of time to fetch the document every time the user enters or exits a cell, unless they are leaving the row and you need to save the document.
- Andre Guirard
IBM Lotus Software
Enterprise Integration Team