Wiring a form to a view in a composite application

I want to open a notes document and then show related documents to it in a view. Similar to the example in http://www-10.lotus.com/ldd/compappwiki.nsf/dx/opening-notes-documents-on-pages.

The document says to add code to the postopen event on the form.

I have pasted the following code (from DD Help and tweaked a tiny bit):

Dim s As New NotesSession

Dim pb As NotesPropertyBroker

Set pb = s.GetPropertyBroker()

Call pb.setPropertyValue(“Track”,newCategory$)

Call pb.Publish()

I also added a print statement to the event that shows the value isn’t being published.

Adding the same code to a view works ok, so I know my WSDL is all OK. I basically made a property called “Track”

Any help would be really appreciated.

All the examples I find seem to be geared at the expert level, really basic simple examples seem to be lacking…