Finding current logged in username

C

Colin Cox

I am trying to insert into a field the current windows user login id. I have
created a module with the function FOSUsername as described in
http://mvps.org/access/api/ap0008.htm. If I use the function to set the
default value of the field it comes up with - #Name?

Please be aware my knowledge of using access is not great. I am using Access
2003.

Thanks
 
D

Douglas J. Steele

Ensure you've copied everything in the shaded area (between Code Start and
Code End) into a new module (not a class module, nor a module associated
with a form or report). When you save the module, make sure its name isn't
the same as any existing function or sub (I always preface my modules with
"mdl" or "bas" ensure the names are unique)
 
C

Colin Cox

Thank you Douglas for your prompt reply, I had named the module with the same
name as the function. It now works fine.

Regards

Colin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top