> Arvin,
>
[quoted text clipped - 15 lines]
> Should this be public and not private?
> Or am I missing/not doing something else wrong?
Not sure what the problem is. Have you copied the api code? Have you
compiled the code? Does it compile? If not, what is the error message? If it
does compile try running something like this in a query;
SELECT FirstName, LastName, fOSUserName() AS Expr1
FROM MyTable;
Of course you'll need to put your own field and table names in.
One other thing that occured to me, you cannot use non-built-in functions in
a table because the expression service doesn't run in tables. But it should
work in a query, form, or report.

Signature
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
Dave - 12 Apr 2008 16:05 GMT
"Have you copied the api code? Have you
compiled the code? Does it compile? "
Well I am totally missing something.
I copied the code that was one the link you posted into a new module.
I am not sure what the api code is but I am sure I have compiled nothing.
sounds like this is going to be above my head for what I was hoping was
simple :(
Thanks for the tip about aaron
dave
>> Arvin,
>>
[quoted text clipped - 28 lines]
> in a table because the expression service doesn't run in tables. But it
> should work in a query, form, or report.
Pete D. - 12 Apr 2008 21:07 GMT
I have used this for years in the form before update. I also display it on
the form, tends to make users more aware of attention to details. Also when
I had to go to a hearing I had to place individual at the machine, not just
someone used thier logon so with witness that they were at that machine case
closed. fOSMachineName is also on same web site. Much thanks to Dev Ashish
for fOSUserName and fOSMachineName.
'------------------------------------------------------------
' M_LastModified
'
'------------------------------------------------------------
Function fLastModified()
On Error GoTo fLastModified_Err
With CodeContextObject
.DateModified = Date
.TimeModified = Time()
.UserLogon = fOSUserName()
.MachineName = fOSMachineName()
End With
fLastModified_Exit:
Exit Function
fLastModified_Err:
MsgBox Error$
Resume fLastModified_Exit
End Function
>> Arvin,
>>
[quoted text clipped - 28 lines]
> in a table because the expression service doesn't run in tables. But it
> should work in a query, form, or report.
>Should this be public and not private?
Yes.

Signature
John W. Vinson [MVP]