Solved

Bill-Hanson Follow-up PostOpen db

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

  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…
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.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

760 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

20 Experts available now in Live!

Get 1:1 Help Now