Solved

Bill-Hanson Follow-up PostOpen db

Posted on 2009-04-07
5
888 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

914 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now