Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Bill-Hanson Follow-up PostOpen db

Posted on 2009-04-07
5
Medium Priority
?
900 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
[X]
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
  • 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 2000 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

618 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