PC Review


Reply
Thread Tools Rate Thread

Current User Problem

 
 
jmillerWV
Guest
Posts: n/a
 
      25th Aug 2009
Am moving to SQL and have run into a problem. In full Access user logs in and
code is able to get "CurrentUser()" anytime. When I try this in SQL with
either a .adp or .mdb front end linked to the data in SQL, I am unable to get
the current user. Is there a reason for this under SQL? Running SQL server
2000 and Access 2003. I have to know the user because of order entry and
tracking of changes ot each order. Thanks in advance for your assistance.
 
Reply With Quote
 
 
 
 
Sylvain Lafontaine
Guest
Posts: n/a
 
      26th Aug 2009
If I remember correctly, CurrentUser() is associated with protected Access
database (protected with a MDW security file) and return only the Access
login ID and not the Windows login Id or the System Login ID.

Use the following code to retrieve the system login ID:

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

On SQL Server, you can also make a call to the stored procedure
SUSER_SNAME(); however, I don't know if this will work if your users are not
using each one their own login account.


--
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Email: sylvain2009 sylvainlafontaine com (fill the blanks, no spam please)
Independent consultant and remote programming for Access and SQL-Server
(French)


"jmillerWV" <(E-Mail Removed)> wrote in message
news:3F8DEF3E-D8A8-45C6-9345-(E-Mail Removed)...
> Am moving to SQL and have run into a problem. In full Access user logs in
> and
> code is able to get "CurrentUser()" anytime. When I try this in SQL with
> either a .adp or .mdb front end linked to the data in SQL, I am unable to
> get
> the current user. Is there a reason for this under SQL? Running SQL server
> 2000 and Access 2003. I have to know the user because of order entry and
> tracking of changes ot each order. Thanks in advance for your assistance.



 
Reply With Quote
 
jmillerWV
Guest
Posts: n/a
 
      26th Aug 2009
Thanks for the response. Yes I am looking for a way to get the current user
of the database on a specific machine. Upon login a seperate screen loads in
the background that contains information about the current user, this info is
used on order screens, check in screens and so on. I found it is eaiser to
load this screen than to use lookups each time the info needs to be inserted
into a form. Again thanks for the response.

"Sylvain Lafontaine" wrote:

> If I remember correctly, CurrentUser() is associated with protected Access
> database (protected with a MDW security file) and return only the Access
> login ID and not the Windows login Id or the System Login ID.
>
> Use the following code to retrieve the system login ID:
>
> http://www.mvps.org/access/api/api0008.htm
>
> On SQL Server, you can also make a call to the stored procedure
> SUSER_SNAME(); however, I don't know if this will work if your users are not
> using each one their own login account.
>
>
> --
> Sylvain Lafontaine, ing.
> MVP - Windows Live Platform
> Email: sylvain2009 sylvainlafontaine com (fill the blanks, no spam please)
> Independent consultant and remote programming for Access and SQL-Server
> (French)
>
>
> "jmillerWV" <(E-Mail Removed)> wrote in message
> news:3F8DEF3E-D8A8-45C6-9345-(E-Mail Removed)...
> > Am moving to SQL and have run into a problem. In full Access user logs in
> > and
> > code is able to get "CurrentUser()" anytime. When I try this in SQL with
> > either a .adp or .mdb front end linked to the data in SQL, I am unable to
> > get
> > the current user. Is there a reason for this under SQL? Running SQL server
> > 2000 and Access 2003. I have to know the user because of order entry and
> > tracking of changes ot each order. Thanks in advance for your assistance.

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
import workgroup user contacts into current SBS user outlook add b Magnetoram Microsoft Outlook Installation 1 8th Dec 2007 12:49 PM
Fixed one problem, now another -- current user notification =?Utf-8?B?eG53cml0ZXI=?= Microsoft Word Document Management 3 5th Feb 2007 12:12 PM
current date & time & current user =?Utf-8?B?Sm93ZW4=?= Microsoft Access 1 5th Feb 2005 07:25 PM
Find current Security Group of current user Deano Microsoft Access Form Coding 2 25th Nov 2004 09:08 AM
Start Menu - All Programs - All users/Current user (Default user) Gary Windows XP Security 2 11th Aug 2003 06:52 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:51 AM.