Thursday, April 20, 2006

SnTT: Forcing Users to Use Your Button

OK, so I'm back with another SnTT tip. This is one we use to force users to click an action button to edit a document rather than use any other means (open from a view in Edit mode, press CTRL-E, click Actions | Edit Document, etc.).

This defines a global variable on the form (since it has to be available to the QueryModeChange and the action button) and includes code for the form's QueryOpen and QueryModeChange events, plus code for the action button itself. I haven't tested this in any other kind of button/hotspot within a form, but I suspect it would work.

We use it in an application where we want users to make changes only through a dialog box so we can restrict the fields they can change. Sure, we could have run the code from the QueryModeChange, but that's the beauty of Notes/Domino: lots of different ways to accomplish the same thing!


Option Public
Dim EditAction As Integer


Sub Querymodechange(Source As Notesuidocument, Continue As Variant)
If Not Source.EditMode and Not EditAction Then
Messagebox "You must use the Edit action button to edit the document",64,"Edit " &_

Continue = False
End If
End Sub
Sub Queryopen(Source As Notesuidocument, Mode As Integer,_

Isnewdoc As Variant, Continue As Variant)
If Not Isnewdoc Then
If Source.EditMode Then
Messagebox "This document cannot be opened in Edit mode",16,"Edit Document"
Continue = False
End If
End If
End Sub

'Edit: (action button)

Sub Click(Source As Button)
Dim ws As New NotesUIWorkspace

EditAction = True

' Do your checks to make sure they can edit the document, then put it into Edit mode

ws.CurrentDocument.EditMode = True

EditAction = False
End Sub

This LotusScript was converted to HTML using the ls2html routine,
provided by Julian Robichaux at

Categories: Show-n-Tell Thursday_

Tuesday, April 18, 2006

Mail Database Weirdness

I've been pretty quiet on here lately, mostly because it has been really busy. I want to find something good for Show-n-Tell Thursday but everything I find seems either too basic or too complex. Oh well, that's not what this is really about.

Lately, every time I open my mail database (Notes 6.5 client, regular mail template), it goes to one of my folders rather than to the Inbox. This happens in both my local and server replica. And it happens even after refreshing the design from the template. I can't find any setting that would provoke this behavior and it happens regardless of whether there is unread mail in the folder or the Inbox. I can close the database when I am in the Inbox and it still opens to the folder.

I have my Inbox open in a frame on my Welcome page but I'm not sure that matters either.

It isn't always annoying (sometimes it is) but it is really puzzling. I can't explain why it would happen and I can't make it stop! That whole last sentence is what bothers me. Any ideas of how to fix it? If I come up with something, I'll post it.

Monday, April 10, 2006

Katrina Relief

Last week, three adults and nine high school teens from the youth group I work with went to St. Bernard Parish, LA, to help with Katrina clean up. They showed us pictures from their trip last night and shared the one word that comes to mind when they think of the trip. Those include "overwhelming", "indescribable", "unbelieveable" and "amazing". They were in an area where 27,000 homes were destroyed and only 1,000 have been rebuilt in 7 months.

The pictures we have all seen show only part of the story. As far as you can see, it all looks the same. But in the midst of the devastation, they saw signs of hope and positive energy. They feel like they made a bit of a difference, but recognize that it will take years for things there to get back to "normal", if they ever do.

I'm proud to know them and that they gave up their spring break to share with those who are in need.

Categories: Youth Ministry_

Tuesday, April 4, 2006

Once in a Lifetime

I received this from a coworker. It was too goofy (and geeky) to let it go without sharing it.

On Wednesday, at two minutes and three seconds after 1:00 in the morning, the time and date will be 01:02:03 04/05/06.

That won't ever happen again - at least in our lifetime. And, just think of how many of us are just going to sleep through this once in a lifetime event!

You may now return to your (normal ?) life

UPDATE: I realized later that another "once-in-a-lifetime" event will occur later in the year and that we might even be awake for that one. It will be at 11:10:09 08/07/06. Why do these things come into my head?