to have the user name who enter the data within the form

mana

Registered User.
Local time
Today, 00:07
Joined
Nov 4, 2014
Messages
265
Hello,

i have form that i attached to you,
i want to have in (text box where mona is written) to have the name of the user name who enters data in this form
but i don't know how to do it?
the user is in another table as users
i also attached the data from this text box.
can you help me pelase
thanks
 

Attachments

  • Unbenannt.jpg
    Unbenannt.jpg
    89.9 KB · Views: 157
  • Unbenannt1.jpg
    Unbenannt1.jpg
    91.6 KB · Views: 157
I came up with this, but I'm not sure if there are other more effective ways of retrieving it.
Code:
Public Function GetUserName() As String
    GetUserName = Nz(Environ("USERNAME"), vbNullString)
End Function
 
but this is the web access database
are you sure about it?
 
but this is the web access database
are you sure about it?

BlueIshDan's idea works in a Company Network situation, and does not apply to normal web based systems. Your idea will work, but leaves open the possibility that a user could select an incorrect name.

I assume that your system (as with any good web based system) verifies the identity of the user via some sort of login screen before it allows the user to continue to any other parts of the system, and that process could record and save the approved identity for use by the other parts of the system. in this way, a combo box picker would not be needed.

-- Rookie
 
But I don't know where to write this?
Because I saw there is a client function
Does it work with web as well?
 

Users who are viewing this thread

Back
Top Bottom