a few of the problems that happen with many users accessing a single file using kix.

using open() will lock the file to that current user. you will get errors if another user tried to open() the same file while the file is locked.

Also, you have

$file = $date+'.log'

but you are using the variable $Sfile in the open() code... is this a typo?

About the only way to get aroud the file lock problem is to use a seperate log file for each user.


Code:

Function TDinout
$date = Join(Split(@date,"/"),"")
$file = $date + '.' + @userid + '.log'
$path = '\\server\folder\logdir

if $form.visible
$ = Open(1,$path +'\'+$file,5)
$ = WriteLine(1,@USERID+ " Open instance"+@CRLF)
$ = WriteLine(1,@DATE+" "+@TIME+ @CRLF)
$ = Close(1)
endif

if $form.hide
$ = Open(1,$path +'\'+$file,5)
$ = WriteLine(1,@USERID+ " Close instance"+@CRLF)
$ = WriteLine(1,@DATE+" "+@TIME+ @CRLF)
$ = Close(1)
endif
EndFunction