aentice
asked on
Bill-Hanson Follow-up PostOpen db
I posted a question yesterday and you helped me resolve it. Below is the answer you gave.
When I tested it again, it made my notes shut down and an error on the left bottom said "Error, Script is Busy". No other code was added to the db, this is the only one in it. Thanks in Advance.
Sub Postopen(Source As Notesuidatabase)
Call Source.Close
Dim workspace As New NotesUIWorkspace
Call workspace.OpenDatabase ( "ACINOTESOHIO/NotesUS", "3230_030.nsf" )
End Sub
When I tested it again, it made my notes shut down and an error on the left bottom said "Error, Script is Busy". No other code was added to the db, this is the only one in it. Thanks in Advance.
Sub Postopen(Source As Notesuidatabase)
Call Source.Close
Dim workspace As New NotesUIWorkspace
Call workspace.OpenDatabase ( "ACINOTESOHIO/NotesUS", "3230_030.nsf" )
End Sub
ASKER
What I needed to do was close the db that opened the second one. This code do not close the parent.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Not sure why you're getting the error message, but It probably has something to do with the event timing.
You may be able to get around the timing issue by trying daj_uk's suggestion.
Setup the 1st database like he says, then the Database.PostOpen event could simply contain...
Sub Postopen(Source As Notesuidatabase)
Call Source.Close
End Sub
You may be able to get around the timing issue by trying daj_uk's suggestion.
Setup the 1st database like he says, then the Database.PostOpen event could simply contain...
Sub Postopen(Source As Notesuidatabase)
Call Source.Close
End Sub
ASKER
Thanks!
Sub Postopen(Source As Notesuidatabase)
Dim workspace As New NotesUIWorkspace
Call workspace.OpenDatabase ( "ACINOTESOHIO/NotesUS", "3230_030.nsf" )
Call Source.Close
End Sub
Basically, open the new database first, before closing the current window. If you close the current window first I do not think the code will complete.