So, I'm new to this Notes thing, and learning and all I want it to do is check and see if the user already has a document, if they do, then open that one (on open for the database), if not, create one. All other forms/documents are driven by this one and each employee only gets one per year. The view (so uniquely named 'My Documents' works and only returns a collection of documents by
@Name([CN];@UserName). essencially if Doc = view.GetFirstDocument Is Nothing then it should create a document based the form "Sales Report" if its a document then that should be opened for editing.
I know this probably sounds stupid to most of you advanced coders but I've tried a thousand things and I dont think that the dumb database is even executing the script in PostOpen which I borrowed from this site:
Dim session As New Notessession <br/>
Dim ws As New NotesUIWorkspace <br/>
Dim db As NotesDatabase <br/>
Dim view As NotesView <br/>
Dim doc As NotesDocument<br/>
Dim uidoc As NotesUIDocument<br/>
Set db = session.CurrentDatabase<br/>
Set view = db.GetView("My Documents")<br/>
<br/>
On Error Resume Next <br/>
Set doc = view.GetFirstDocument<br/>
<br/>
If doc Is Nothing Then<br/>
Set uidoc = ws.ComposeDocument("","","SalesReport") <br/>
Else<br/>
ws.OpenDatabase "","","SalesReport"<br/>
ws.EditDocument <br/>
End If <br/>
Any input would be MOST appreciated.
feel free to contact me at GroundHoundFive@Yahoo.com
-MCM