PC Review


Reply
Thread Tools Rate Thread

Check if person hitting submit is in the user's table

 
 
JNariss
Guest
Posts: n/a
 
      6th Dec 2005
Hello,

I have created (almost finished) my database. I have a table called
Users which holds Full name, email address, user id, phone, manager and
analyst. The manager and analyst are checkbox (boolean) fields which
indicate if that user is a manager or analyst.

I have a form callled Approver Form. This a simple form with only a few
text boxes so the manager can go in and assign an analyst from my
listbox. It has fields of: Appraovers Name, Analyst Assigned, Analyst
EMail and Analyst Phone. On this form is a "submit" button which I have
programmed to Submit the Form to the database by adding a new record,
send an email to the Analyst to notify them they are the assigned
analyst, and a MsgBox which pops up telling the manager they have
notified the analyst.

I would like to somehow be able to check that the "Approvers Name" is a
manager in the users table. Is there a way to check this? And if the
person is not a manager then pop up a MsgBox stating they don't have
the ability to approve this form.

-Thanks,
Justine

 
Reply With Quote
 
 
 
 
George Nicholson
Guest
Posts: n/a
 
      7th Dec 2005
One approach:
If nz(DLookup("[Manager]","Users","[FullName] = '" & ApproversName &
"'"),0) = 0 Then
' Not authorized (Manager value is Null or False)
Else
' Authorized
End if

HTH,
--
George Nicholson

Remove 'Junk' from return address.


"JNariss" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hello,
>
> I have created (almost finished) my database. I have a table called
> Users which holds Full name, email address, user id, phone, manager and
> analyst. The manager and analyst are checkbox (boolean) fields which
> indicate if that user is a manager or analyst.
>
> I have a form callled Approver Form. This a simple form with only a few
> text boxes so the manager can go in and assign an analyst from my
> listbox. It has fields of: Appraovers Name, Analyst Assigned, Analyst
> EMail and Analyst Phone. On this form is a "submit" button which I have
> programmed to Submit the Form to the database by adding a new record,
> send an email to the Analyst to notify them they are the assigned
> analyst, and a MsgBox which pops up telling the manager they have
> notified the analyst.
>
> I would like to somehow be able to check that the "Approvers Name" is a
> manager in the users table. Is there a way to check this? And if the
> person is not a manager then pop up a MsgBox stating they don't have
> the ability to approve this form.
>
> -Thanks,
> Justine
>



 
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
IE closes when hitting submit buttons xudzh Windows XP Internet Explorer 1 4th Nov 2005 11:34 AM
Difference between hitting enter and clicking submit? 23s Microsoft ASP .NET 2 22nd Feb 2005 08:13 PM
Hitting the "Submit" button multiple times by mistake Dominic Microsoft ASP .NET 6 22nd May 2004 09:45 PM
Time user takes before hitting submit Asad Microsoft VB .NET 1 27th Apr 2004 03:16 AM
Re: Disabling second submit by hitting browser Refresh button Kevin Spencer Microsoft ASP .NET 2 30th Aug 2003 08:10 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:46 AM.