Answer the question
In order to leave comments, you need to log in
Why doesn't Access see the function from the module?
The question is pretty simple.
I wrote a function in the module:
Public Function GetUserName() As String
' GetUserName = Environ("USERNAME")
' Environ("USERNAME") is easily spoofed, see comment by HansUp
GetUserName = CreateObject("WScript.Network").UserName
End Function
=GetUserName()
Answer the question
In order to leave comments, you need to log in
it turns out that the function is not in the scope of the executable code
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question