Ok, good first start. Have you ever looked at your mail file design ?
A mail db depends on a standard template. A template in Notes is a specific db that houses the design of all production dbs that reference it. You can find that reference if you open the Properties dialog of the database (file/database/properties). Look at the middle tab (the one with the hammer and square ruler), you have a middle section labelled "Inheritance". That is where the reference design is designated ("Inherit design from master template").
Just under that, you have another checkbox ("Database file is a master template") and a name field underneath. This is where you can define your db as a design reference for any other db that would like to use your design.
You can actually use both simultaneously. In other words, you can create a variation of a standard design, and define the variation as the standard for your corporation. We'll do that when your code works fine on your mail file.
For now, open your mail file in Design mode and check the design categories on the left hand side. You should see a list with
- Framesets
- Pages
- Forms
- Views
- Folders
- Shared Code
- Shared Resources
- Other
We are interested in Other right now. Click on that, and you should see a sublist comprised of :
- Database Resources
- Navigators
- Synopsis
Now we want to go into the Database Resources. One click is enough, and it opens a different list in the right-hand panel. You should see :
- Icon
- "Using Database" Document
- "About Database" Document
- Database Script
Now we want to go to Database Script. You need to double-click here to open it.
If all is right, the right hand panel has now divided itself into two parts : a navigation section (on the left), and a code section (on the right).
Here is where the work is actually done. The navigator contains a list of event names - each name corresponds to a specific event in the everyday life of the database.
We want to modify the PostOpen event. One click on that name, and you will see code on the code panel (the right-hand side).
That code should just be a placemarker :
Code:
Sub Postopen(Source As Notesuidatabase)
End Sub
If it looks any different, we abort now !
If that is what you see, then you can actually copy/paste the example I gave you over the code in the database.
There should not be any errors yet - but you will have to reconfigure your error messages.
So, any problems with that ?
Pascal.