Auto populate textbox with current username.

D

Dave

If I have a form with a text box called txtInspector, is it possible to
automatically populate the text box with whoever is logged on to the
computer?

Dave
 
D

Dave

This is exactly what I need, can you provide further instructions on how I
should apply this to my form. Does this apply to the whole form, or just the
text box I want to populate? The text box is named txtInspector.

Thank you
Dave
 
V

Van T. Dinh

I am not sure what you meant by "apply to this Form"???

If you simply want to display the Windows LogOnID in a TextBox on the Form,
set the ControlSource of the TextBox to:

= fOSUserName()

(including the equal sign)
 
Top