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
>
|