How do I autofill a field with the specific computer ID ?

T

Talan

I need to create a field and have it autofill with the
name of the computer that the person is using at that
time. I need this to be automatic and not changable by
the user.

Thanks
 
J

Joan Wild

There is code at
http://www.mvps.org/access/api/index.html
that you can use to retrieve the computer name (Current Computer Name)
or the username (Network User Name)

Add your field to your table. Assuming that users interact with the table
via forms only, add a textbox to your form(s) setting its default value to
the function. You can hide the textbox if you wish. This will put their
computer name in that field when a new record is created.

If you wish it to be updated whenever there is a change, you'd use the
Before Update event of the form to set the value to the current computer
name
 

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