In a form of my database design, I want to perform a button to save the
form and then immediately close the form window and the database.
I then write the script below:
Dim uiWorkspace As New NotesUIWorkspace
Dim uiDoc As NotesUIDocument
Set uiDoc = uiWorkspace.CurrentDocument
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Call uiDoc.Close
Call db.Close
After I run the form, I have the following error messages:
Cannot close the context database
Why ?
Thanks!
Close is not a method of NotesDatabase class.
You can use @Command([FileSave]) and @Command([FileCloseWindow])
to do this.
>Close is not a method of NotesDatabase class.
>You can use @Command([FileSave]) and @Command([FileCloseWindow])
>to do this.
Within LotusScript?
--
Kendall P. Bullen Web: http://www.his.com/~kendall/
E-mail: kendall@-->^^^^^^^
Why do you want this to be Lotus Script based ?
The formula language is excellent in simple, easy situations,
and this is one of them.
A simple
@If (@Command ([FileSave]) ; @Command ([FileCloseWindow]); "")
will work perfectly.
Good luck,
Nicolas Abesdris / CLS / Vortex
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Nicolas Abesdris has a bachelor of computer science from University
of Montreal, and is a Certified Lotus Specialist Developer II with
three years of experience. For information about Vortex Consulting
send email to: vor...@montreal.net
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>> Within LotusScript?
>
> Why do you want this to be Lotus Script based ?
I asked about LotusScript because we have a need to do it from LotusScript
(which isn't possible).
> The formula language is excellent in simple, easy situations,
> and this is one of them.
That's all well and good, but amazingly enough, some things can't be done
in formula language for various reasons. . . .
KPB