Hi Al Campagna,
Thanks for the help again. Everything works so far so good regarding the previous
questions I have. So here's what I am able to do: Capturing the DOC, DOLE, and LUE.
But I have one more problem that i've been trying all day but no luck. I want my
database to allow the user who added a record be able to edit that record but no one
else. But in viewing mode, everyone can view all records. So I'm taking this one
step at a time. I'm currently working on only the user who added the record be
allowed to modified that record. So my Record form is based on a query. And this
what I have so far:
Name
Address
DOC
DOLE
LUE
TempLUE = temp value of fOSUserName()
and I want when my form opens, the query would only select records that the LUE =
TempLUE. TempLUE is a temp value that's copied from fOSUserName.
But i'm having the problem of getting my form to run this query when it opens.
Thanks.
Paul.
Paul,
You'll be using an API call to the operating system for that value.
Try this...
http://www.mvps.org/access/api/api0008.htm
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions
"Find a job that you love, and you'll never work a day in your life."
Hi Al Campagna,
Thanks a lot! your code is really easy to understand and use.
Everything works fine, the DOC and DOLE. But when I do the =[CurrentUser], it
doesn't give me the network logon, but only the Admin logon. So I'll trying to use
the logon code I grabbed from some other website and let you know the results, or
maybe even ask you for more help if it doesn't work. Thanks again.
Paul.
Paul,
On my website, I have a sample A97 and A2003 file called Record Statistics, that
demonstrates how to know the Date of Creation (DOC) od a record, and the Date Of
Last Edit (DOLE).
You could add a field to your table called LEU (Last Edit User) that works just
like my DOLE, but capturing the [CurrentUser] system variable.
LEU = [CurrentUser]
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions
"Find a job that you love, and you'll never work a day in your life."
Hello All,
I have a huge database with a lot of users...I have input a procedure that i got
from online to figure out which network user is loging in and using the form...is
there a way i can create another column in my table to capture each time this user
added a record or last edited a record? Thanks and if you need the procedure than
I can paste it on here. Thanks again.