"Cron" <cr*******@hotmail.comwrote in message
news:b5**********************************@y21g2000 hsf.googlegroups.com...
On Sep 30, 2:45 pm, "Keith Wilby" <h...@there.comwrote:
"Cron" <cronok...@hotmail.comwrote in message
news:f2**********************************@y21g2000 hsf.googlegroups.com...
Hi How do I get the windows login name into a field on a form? I found
this code from searching but I can't figure out how to use
it...http://www.mvps.org/access/api/api0008.htm
Thanks,
Ciarán
Assuming you've saved the code in a module, put the name of the function
in
the "Default Value" property of the control you want to display it:
=fOSUserName
Keith.www.keithwilby.com
Thanks for the reply Keith, I've added the code to a new module and
made a new form containing one field with default value =fOSUserName.
The field reads "#Name?" when the form is run. Do I need to link the
module to the form somehow? Sorry I've only done very simple stuff
with VBA.
Cheers
Ciarán
You might try setting the Default Value to =fosUserName().
Fred Zuckerman