this is a kixform, so you should be able to know when a user starts it and when they are closing it, right?

Code:

;----------------------------------------------
; Start the form
;----------------------------------------------
LogIt("Open")
While $Form.Visible
$=Execute($Form.DoEvents)
Loop
LogIt("Close")
Exit 1
.
.
.
function LogIt($action)
$ = open(1,"Your Log",5)
$ = writeline(1, @date + " " + @time + " " + @userid + ": " + $action + @crlf)
$ = close(1)
endfunction



I don't think that you will have to worry much about the file being locked. how many users will be trying to open or close the form at the same exact time? Plus, is locking even an issue with .txt files? i didn't think it was for some reason.
_________________________
Eric