Private Sub Form_Close()
Dim FileNum As Integer
FileNum = FreeFile
Open "[COLOR="Red"]C[/COLOR]:\DatabaseLog.txt" For Append As #1
Print #1, "Database closed by" & " " & Environ("UserName") & " " & "using computer" & " " & Environ("ComputerName") & " " & ":---:" & " " & Now(); ""
Close FileNum
End Sub