473,326 Members | 2,134 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Recording WIF users against their entries

Hi,

Thanks in advance for any assistance regarding my question.

I have setup a database with a WIF containing the usernames and p/words
of several unique data entry operators who will be entering data into
the database.

I would like to know how I record the username of each unique data
entry operator against any entries they input into the database?

Because I have a WIF setup each data entry operator must 'log-in' to
the database to enter data - I'm just not sure how to grab these log-in
details and record them against the operator's input.

If I need to code this is, what would the code look like (roughly) ?
And where would I need to write it?

Many thanks
Chris

Aug 30 '06 #1
12 1799
Hi Chris,

If you cut and paste the following code in to the debug window it will
return the windows login.

? Environ("UserName")

This can be user in code, albeit minus the ?

Good luck

Nick

ch***********@anu.edu.au wrote:
Hi,

Thanks in advance for any assistance regarding my question.

I have setup a database with a WIF containing the usernames and p/words
of several unique data entry operators who will be entering data into
the database.

I would like to know how I record the username of each unique data
entry operator against any entries they input into the database?

Because I have a WIF setup each data entry operator must 'log-in' to
the database to enter data - I'm just not sure how to grab these log-in
details and record them against the operator's input.

If I need to code this is, what would the code look like (roughly) ?
And where would I need to write it?

Many thanks
Chris
Aug 30 '06 #2
<ch***********@anu.edu.auwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
Hi,

Thanks in advance for any assistance regarding my question.

I have setup a database with a WIF containing the usernames and p/words
of several unique data entry operators who will be entering data into
the database.

I would like to know how I record the username of each unique data
entry operator against any entries they input into the database?

Because I have a WIF setup each data entry operator must 'log-in' to
the database to enter data - I'm just not sure how to grab these log-in
details and record them against the operator's input.

If I need to code this is, what would the code look like (roughly) ?
And where would I need to write it?

Many thanks
Chris
The CurrentUser() function returns the name of the account currently logged
on to the database.

Keith.
www.keithwilby.com
Aug 30 '06 #3
WILBY...! CurrentUser returns "Admin" most of the time.

However, that Environ trick is pretty cool, I used to use a WScript
call but I think I'll go that route from now on.

Keith Wilby wrote:
The CurrentUser() function returns the name of the account currently logged
on to the database.

Keith.
www.keithwilby.com
Aug 30 '06 #4

"ManningFan" <ma********@gmail.comschreef in bericht news:11**********************@i42g2000cwa.googlegr oups.com...
WILBY...! CurrentUser returns "Admin" most of the time.

However, that Environ trick is pretty cool, I used to use a WScript
call but I think I'll go that route from now on.
Funny Man !! (Or stupid man ??)
Using WScript is always a bad idea in my opinion!!
Allowing the use is also a bad idea in my opinion!!
So depending on WScript in an Access application is a bad idea.
Lots of sys-admins in my regio here won't allow it.

BUT the point of this post is:
CurrentUser() will always return 'Admn' when NO security is applied....

The OP asked a question about users loggin into the db with User-level-security applied
(WIF=Workgroup Information File I guess ??)

-- Environ("UserName") gives the name of the Windows login as Nick already answered.
-- CurrentUser() gives the name of the user currently logged-on to the Access (secured) mdb as Keith already answered.
Two different animals IMO.

Arno R
Aug 30 '06 #5
Arno - Your advice is... well... Worthless. But thanks for playing.

Arno R wrote:
Funny Man !! (Or stupid man ??)
Using WScript is always a bad idea in my opinion!!
Allowing the use is also a bad idea in my opinion!!
So depending on WScript in an Access application is a bad idea.
Lots of sys-admins in my regio here won't allow it.

BUT the point of this post is:
CurrentUser() will always return 'Admn' when NO security is applied....

The OP asked a question about users loggin into the db with User-level-security applied
(WIF=Workgroup Information File I guess ??)

-- Environ("UserName") gives the name of the Windows login as Nick already answered.
-- CurrentUser() gives the name of the user currently logged-on to the Access (secured) mdb as Keith already answered.
Two different animals IMO.

Arno R
Aug 30 '06 #6

ManningFan wrote:
Arno - Your advice is... well... Worthless. But thanks for playing.
Really? I beg to differ. What are you so hostile for? If someone
knows an answer, I'll take it. I'm not shy. What's the big deal?
There are lots of folks here that will always be better at this than I
am. That's life. What's the point in getting bent out of shape about
it?

Aug 30 '06 #7
The guy comes out of left field and calls me "stupid man", and you
think _I'M_ bent out of shape? If WScript should "never be used", then
why are there MVP pages about it? The guy insulted me and offered bad
advice, he deserves the tongue-lashing he got.

pi********@hotmail.com wrote:
ManningFan wrote:
Arno - Your advice is... well... Worthless. But thanks for playing.
Really? I beg to differ. What are you so hostile for? If someone
knows an answer, I'll take it. I'm not shy. What's the big deal?
There are lots of folks here that will always be better at this than I
am. That's life. What's the point in getting bent out of shape about
it?
Aug 30 '06 #8
"ManningFan" <ma********@gmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
Arno - Your advice is... well... Worthless. But thanks for playing.
Talk about calling the kettle black here. What you talking about?

The user stated that they are using workgroup files, and assign logons to
ms-access users...
>WILBY...! CurrentUser returns "Admin" most of the time.
Again, talk about worthless advice. Did you not bother to read the post? If
you assigning user names, then IT WILL BE A COLD DAY IN HELL THAT THE LOGON
name will be Admin. IT WILL NOT BE "AMDIN" MOST OF THE TIME. It be a very
rare event. So, now, who exactly is giving useless advice here?

If fact, if the user has secured the workgroup file correctly, then likely
the admin logon has little, or no privileges. Don't confuse the admin logon
with that of admins "group" privileges.

Further, the suggesting to use environment valuables is not a very good one.
Batch files, windows start-up settings and even USERS can edit/change the
environment values. You are aware that you can go right click on "my
computer". Click on the advanced tab, and at the bottom you will a button to
"edit" environment variables.

In other words, a user can create a logon environment value, and IT WILL
HAVE NO RELATION TO THAT ACTUAL windows logon.

And, the advice about using scripts is also really good, as many companies
do lock down their computers..and do not allow the use of windows scripts.

So, what is left if you need to grab the windows user logon?

Well, as mentioned, if users have password windows logons, the use of
environment variables is not very good, as any user can go and use the above
advice to create a environment value and assigning it ANY VALUE they want.

So, your environment value in this case will NOT match the windows logon.

The recommend solution is to use the windows user api. ms-access examples
can be found here:

You can get the current network logon name with:

http://www.mvps.org/access/api/api0008.htm

And, the current computer name with:

http://www.mvps.org/access/api/api0009.htm

And, if using ms-access security, then currentuser() will return the
ms-access logon.

I often log all 3 of the above values in some applications.

So, not only is your advice 100% wrong on what value currentuser() will
return IN THIS CASE!!!, the advice to use scripts is not very good either.
and, father, the advice to use environment values is also not very good, as
once again they can be changed. I can change my environment values to your
user logon...but, if I don't have your password, I certainly can't log on as
you. So, using the above api's are faster, more reliable (they will work all
the way back to windows 95, and also work in windows Vista - that can't be
said for environment variables). And, not only are the api's time and tested
over the last 10 years, they are also not subject to tampering with as
compared to environment values

So, as I read your response, it is fine that you made a mistake, or perhaps
did not realise that the person was using workgroup files (you should be big
enough to just simply admit you made mistake). However, your other two
pieces of advice (using scripts), and using environment values are also of
dubious value, and especially so when MUCH better choices such as the api's
exist.

What not just admit you make a mistake here, and the advice you gave was
really not very good here?

Or, if you have better information, please explain to me how, or why that
"most of the time" currentUser() will return admin when using a secured
application ?

I am all open to learning here....and you should also address the issue that
environment values can be easily changed, where the above api's cannot be
tampered with...

This newsgroup is a great place to learn new things...you just have to be
more open to the suggestions here...

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com
Aug 30 '06 #9

"ManningFan" <ma********@gmail.comschreef in bericht news:11*********************@74g2000cwt.googlegrou ps.com...
The guy comes out of left field and calls me "stupid man", and you
think _I'M_ bent out of shape? If WScript should "never be used", then
why are there MVP pages about it? The guy insulted me and offered bad
advice, he deserves the tongue-lashing he got.
Who offered bad advice ??
Seems to be *your* daily play.

So when *you* insult people here, you deserve what ??

Arno R
Aug 30 '06 #10
"Arno R" <ar***********@tiscali.nlwrote in message
news:44**********************@text.nova.planet.nl. ..

Funny Man !! (Or stupid man ??)

Hi Arno. It would appear that FanningMan is from the same stable as PCD but
without the adverts. I plonked him last week, many others have also done so
I believe. I think ignoring the ignorant is a good idea. The FanningMan is
doing just that, fanning the flames of ignorance and stupidity, hence the
blind faith in the Environ property.

Regards,
Keith.
Aug 31 '06 #11
Holy Third Grade, Batman! Not the old "change the username to try to
ridicule him" and *plonk* tactics! I somehow feel humanity let me down
today...

Keith Wilby wrote:
Hi Arno. It would appear that FanningMan is from the same stable as PCD but
without the adverts. I plonked him last week, many others have also done so
I believe. I think ignoring the ignorant is a good idea. The FanningMan is
doing just that, fanning the flames of ignorance and stupidity, hence the
blind faith in the Environ property.

Regards,
Keith.
Aug 31 '06 #12
Children Children Children

Stop all this bickering.

I gave the quick easy way to do this, now if somebody, and Albert
obviously has a better way of doing it then, great! Maybe I can learn
something from him.

All this petty infighting really is beneath all of you.

And I don't want to see a message 'Well he started it'.

But in ManningFan defense Arno R did pay him a personal insult.

Grow up, all of you.

Nick
ManningFan wrote:
Holy Third Grade, Batman! Not the old "change the username to try to
ridicule him" and *plonk* tactics! I somehow feel humanity let me down
today...

Keith Wilby wrote:
Hi Arno. It would appear that FanningMan is from the same stable as PCD but
without the adverts. I plonked him last week, many others have also done so
I believe. I think ignoring the ignorant is a good idea. The FanningMan is
doing just that, fanning the flames of ignorance and stupidity, hence the
blind faith in the Environ property.

Regards,
Keith.
Sep 8 '06 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Sugapablo | last post by:
I had an idea for something that I can't find any evidence if it exists, or if it can be done. I assume it can be done. What I'd like to be able to do, is to allow people who come to my website,...
3
by: Jussi Rasku | last post by:
Hello, I'm working on a small web-script that would allow me to remotely setup recordings to my tv-tuner (on my linux box). The idea is simple, but I'm unsure how to accomplish it. The idea:...
3
by: Chris Thompson | last post by:
I have an Access 97 database to record the current location and status of files in our office. Each file has a record one field of which is it's current location. On the form for each record is a...
1
by: Sakharam Phapale | last post by:
Hi All, I am developing an application like sound recorder. While recording if there is a silence for more than given time (say 5 seconds), Recording should be paused.
5
by: Vincent Pirez | last post by:
Hi, Has anyone managed to code anything that will verify the username and password of a user against the /etc/shadow file? I need to authenticate users based on their local system accounts,...
2
by: rockdale | last post by:
Hi, all: I need to implement a recording functionality on my asp.net webpage. the rough idea is user click a button, then I start recording what the user speaked and then save it as a wave file...
5
by: Ran Vijay | last post by:
Hi all I want to add the facility of recording voice in my website. I want to provide this facility to both the users of Windows as well as Linux. The voice recorded would be send through a e-mail...
8
by: DaveJ | last post by:
Hi, I have a small problem I'm trying to solve in C++ I have a file containing a number of usernames under a serious of groups: Admin --------- Dave834
2
by: PWS | last post by:
Hi all, I developed an online learning website where each student has his own username/password and they can view course materials and take tests online. I did that in PHP and PostgreSQL. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.