Handle of current document in embedded view

I have an embedded view on a form. Both the form and the embedded view have globals defined as

dim uidoc as notesUiDocument

dim doc as notesDocument

The Form set the uidoc and doc in the Post open, while the Embedded view sets the values in the Initialize of the View.

The problem is that the user is on a date field and enters the date, but does NOT tab out of the field. The click on a button on the embedded view. The uidoc says there is a date there, however the document does not have a value. However in a Text field you do get the same values.

I have tried going to the top of the form, and then back to the field I was on, but yet the date value remains blank.

I have also tried in the embedded view to set doc = uidoc.document, but once again the date field always remains blank.

I believe I tried to do a uidoc.refresh, however I think that crashed notes.

Not sure if anybody else has had this issue.

Thanks in advance, John

Subject: Found a Solution

It seems funny to do it this way, but it seems to work. What I do is goto a field at the bottom of the form, then do a uidoc.gotoTop, and finally go back to my field. I guess the ui does not update the backend document on a date until you go past it.

John

Subject: Problem with uidoc.Refresh

Part of the problem that we had was that we had onChange Events for the fields, and they would not fire if the user did not leave the field. Well the method we are doing handles that, however, if the on change event does a uidoc.refresh (since other test may depend on this field), then notes crashes and not very nicely.