PC Review


Reply
Thread Tools Rate Thread

Adding username to table

 
 
PsyberFox
Guest
Posts: n/a
 
      12th Mar 2008
Hi there,

I've now read the security FAQ and succesfully set up security with users,
passwords, etc on my db. My db is form-driven with menu's, etc... running off
linked SQL tables. However, I have the following two questions:
1. How do I add the username per record added? and
2. How do I get around the error message when a user tries to open a form
that he/she has no permission to open?

Thank you in advance!
 
Reply With Quote
 
 
 
 
Joan Wild
Guest
Posts: n/a
 
      12th Mar 2008
If you just want the username for when a record is added, put a field in your tables CreatedBy. Add the field to your form and set the textbox's default value to CurrentUser() (you can hide the textbox if you wish, or at least lock it).

For the second question, I would hide any button's that a user doesn't have permission for. In the open event for your menu form

If faq_IsUserInGroup("ReadOnly", CurrentUser) Then
Me.SomeCmdButton.Hidden = true
Me.SomethingElse.Hidden = true
End If

The faq_IsUserInGroup function can be found in the security FAQ.
http://support.microsoft.com/?id=207793


--
Joan Wild
Microsoft Access MVP
"PsyberFox" <(E-Mail Removed)> wrote in message news:5B3721E9-037B-4144-8189-(E-Mail Removed)...
> Hi there,
>
> I've now read the security FAQ and succesfully set up security with users,
> passwords, etc on my db. My db is form-driven with menu's, etc... running off
> linked SQL tables. However, I have the following two questions:
> 1. How do I add the username per record added? and
> 2. How do I get around the error message when a user tries to open a form
> that he/she has no permission to open?
>
> Thank you in advance!

 
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
Adding a Username to a Transaction from a Form =?Utf-8?B?UmlsbG8=?= Microsoft Access Forms 1 31st Aug 2006 04:00 AM
adding username/password to website =?Utf-8?B?Vk1J?= Microsoft C# .NET 2 21st Aug 2006 10:07 PM
Admin username vanished when adding new username =?Utf-8?B?SW5zcGlyZWQ4ODg=?= Windows XP Help 5 10th Oct 2005 04:24 PM
Xp adding a period after username for Dial-Up Erik K Windows XP Basics 1 12th Jun 2004 05:16 PM
Adding Network UserName On Print JonRowland Microsoft Word New Users 1 28th Jan 2004 12:29 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:56 AM.