return function value to the a field in a table for every new record.

return function value to the a field in a table for every new record.

am 25.10.2007 21:34:32 von Venk

dear group.

I have a table with a few columns and I have a form to add/modify/
delete records

now whenever a new record is added, i want one column "logged By" to
automatically get the windows login name.

I found a API function that can do that. but how should I add the
return value of the function fOSUserName() to the field in the table.

I want this to happen automatically to every new record that the user
adds.

Re: return function value to the a field in a table for every new record.

am 25.10.2007 22:57:07 von Bob Quintal

XYZ wrote in
news:1193340872.243491.128390@q3g2000prf.googlegroups.com:

> dear group.
>
> I have a table with a few columns and I have a form to add/modify/
> delete records
>
> now whenever a new record is added, i want one column "logged By"
to
> automatically get the windows login name.
>
> I found a API function that can do that. but how should I add the
> return value of the function fOSUserName() to the field in the
table.
>
> I want this to happen automatically to every new record that the
user
> adds.
>
you cannot use the fOsUsername() in the table's defaultValue
property directly, because access refuses to see the api call in the
defaultvalue property of a field, but if you use =Environ
("username") you'll get the same result (usually)
I also add the field [Logged When] with the default value of =now()

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com