Solved

Bill-Hanson Follow-up PostOpen db

Posted on 2009-04-07
5
891 Views
Last Modified: 2013-12-18
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
0
Comment
Question by:aentice
  • 2
  • 2
5 Comments
 
LVL 5

Expert Comment

by:daj_uk
ID: 24086865
A quick look would suggest the order is wrong....I would try

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.
0
 

Author Comment

by:aentice
ID: 24086907
What I needed to do was close the db that opened the second one. This code do not close the parent.
0
 
LVL 5

Accepted Solution

by:
daj_uk earned 500 total points
ID: 24087031
I've tested it both ways and they work.  However, if what I understand is correct, you simply wish one database to open another, and immediate close itself

A better way to do this is:
  Copy a Database link for the new database
  Open the old database in designer, and edit the "About document" under database resources
  Paste the link
  In the Properties for the old database, change to the "launch" tab - 4th tab
  Change "When opened in the Notes client" to "Launch first doclink in About Application"

This should do the trick
0
 
LVL 22

Expert Comment

by:Bill-Hanson
ID: 24087592
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
0
 

Author Closing Comment

by:aentice
ID: 31567476
Thanks!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

679 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