Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Bill-Hanson Follow-up PostOpen db

Posted on 2009-04-07
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
Question by:aentice
  • 2
  • 2

Expert Comment

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.

Author Comment

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

Accepted Solution

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
LVL 22

Expert Comment

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

Author Closing Comment

ID: 31567476

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Lotus Notes MS Office Library tabs display incorrectly 7 355
Domino Server 2 80
Cannot access mail archive from IBM domino 5 108
IBM Lotus Notes Rules not working 5 238
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

856 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