Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to log how often a qv application is opened. Every time the app is opened I want to write to a log file the user and date/time. My approach is to set a trigger on the document. When opened I run a macro, but it doesn't write to the file. Any suggestions?
Sub LogOpen
Const ForAppending = 8
Set objFSO = CreateObject ("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile _
("C:\Users\frank\Documents\QVopenlog.txt", ForAppending, True)
objTextFile.WriteLine ("QVuser" )
end sub
First, are you trying to do this on the desktop client or server?
If you want to track server access, there are better options, using the server logs (and there are already existing applications to evaluate the logs).
If you are writing in QV Desktop, it is working perfectly.
I think you need to provide "System Access" & "Allow System Access" in Edit Module window.
Option is available in Requested Module security
Providing "System Access" & "Allow System Access" allowed the record to be written. However, the literal "QVuser" was written and not the username that opened the application. Also, how do I get the date written? thanks.
Desktop client