Starting Database with different forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to start access (MS Access 2000) in a forms view based on the
CurrentUsers permission level. For example. A user defined as a Manager
would get the Manager's Main menu and Staff members would open to the Staff's
main menu. I've tried setting up an autoexec macro with conditions based on
a query that pulls the "class" (manager, staff) field out of the secured
employee info but this is not working.

using expression builder I get this
[qry_Find_User_Class]![Emp_Class_ID] = "Manager"

The query uses the criteria CurrentUser() to pull the Emp_Class_ID
("Manager", "Staff", etc..) from the secured Emp_Info table.

This does not work.

Any suggestions?
 
Norah,

Access has no way of knowing what [qry_Find_User_Class]![Emp_Class_ID]
means, and even if it could understand this syntax, it wouldn't know
which record you are referring to. Try your macro Condition like this...
DLookup("[Emp_Class_ID]","qry_Find_User_Class")="Manager"

However, are you sure the data in the [Emp_Class_ID] field is actually
"Manager", "Staff", etc.? Please post back if you need further help
with this.
 
Hi,

I'm not sure I follow but maybe this is close to what you are looking for:

AUTOEXEC macro
Condition Action
CurrentUser() = "Manager" OpenForm -----> Manager's
Form
CurrentUser() = "Employee" OpenForm -----> Employee's
Form

OR maybe you lookinf for:

Have a criteria in whatever Form is opened by the autoexec macro with the
criteria
Field: Emp_Class_ID
Criteria: CurrentUser()


I hope this helps! If you have additional questions on this topic, please
respond back to this posting.


Regards,

Eric Butts
Microsoft Access Support
(e-mail address removed)
"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <http://windowsupdate.microsoft.com/> to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."

This posting is provided "AS IS" with no warranties, and confers no rights



--------------------
| Thread-Topic: Starting Database with different forms
| thread-index: AcSkrtKt+yc2bLa/R5yUopZf0U9jcg==
| X-WBNR-Posting-Host: 192.60.35.127
| From: "=?Utf-8?B?Tm9yYWg=?=" <[email protected]>
| Subject: Starting Database with different forms
| Date: Mon, 27 Sep 2004 09:27:03 -0700
| Lines: 18
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.access.macros
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.access.macros:33490
| X-Tomcat-NG: microsoft.public.access.macros
|
| I would like to start access (MS Access 2000) in a forms view based on
the
| CurrentUsers permission level. For example. A user defined as a Manager
| would get the Manager's Main menu and Staff members would open to the
Staff's
| main menu. I've tried setting up an autoexec macro with conditions based
on
| a query that pulls the "class" (manager, staff) field out of the secured
| employee info but this is not working.
|
| using expression builder I get this
| [qry_Find_User_Class]![Emp_Class_ID] = "Manager"
|
| The query uses the criteria CurrentUser() to pull the Emp_Class_ID
| ("Manager", "Staff", etc..) from the secured Emp_Info table.
|
| This does not work.
|
| Any suggestions?
| --
| Never take life seriously. Nobody gets out alive, anyway.
|
 
This worked perfectly. Thank you sooooo much.

Steve Schapel said:
Norah,

Access has no way of knowing what [qry_Find_User_Class]![Emp_Class_ID]
means, and even if it could understand this syntax, it wouldn't know
which record you are referring to. Try your macro Condition like this...
DLookup("[Emp_Class_ID]","qry_Find_User_Class")="Manager"

However, are you sure the data in the [Emp_Class_ID] field is actually
"Manager", "Staff", etc.? Please post back if you need further help
with this.

--
Steve Schapel, Microsoft Access MVP
I would like to start access (MS Access 2000) in a forms view based on the
CurrentUsers permission level. For example. A user defined as a Manager
would get the Manager's Main menu and Staff members would open to the Staff's
main menu. I've tried setting up an autoexec macro with conditions based on
a query that pulls the "class" (manager, staff) field out of the secured
employee info but this is not working.

using expression builder I get this
[qry_Find_User_Class]![Emp_Class_ID] = "Manager"

The query uses the criteria CurrentUser() to pull the Emp_Class_ID
("Manager", "Staff", etc..) from the secured Emp_Info table.

This does not work.

Any suggestions?
 
Thank you Eric. The first part was not exactly what I was looking for. I
had a query that used the CurrentUser() variable as a criteria to look up the
employee assigned class. The CurrentUser() does not produce this since each
user will have a different logon. The dlookup suggestion worked fine.

The second part of your answer did spark my thinking though. I can use a
open "HIDDEN" form to work the other issues out that I am having when trying
to set up the rest of the forms and reports based on the users class (ie,
permissions)

I appreciate you input, it was wonderful.

Eric Butts said:
Hi,

I'm not sure I follow but maybe this is close to what you are looking for:

AUTOEXEC macro
Condition Action
CurrentUser() = "Manager" OpenForm -----> Manager's
Form
CurrentUser() = "Employee" OpenForm -----> Employee's
Form

OR maybe you lookinf for:

Have a criteria in whatever Form is opened by the autoexec macro with the
criteria
Field: Emp_Class_ID
Criteria: CurrentUser()


I hope this helps! If you have additional questions on this topic, please
respond back to this posting.


Regards,

Eric Butts
Microsoft Access Support
(e-mail address removed)
"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <http://windowsupdate.microsoft.com/> to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."

This posting is provided "AS IS" with no warranties, and confers no rights



--------------------
| Thread-Topic: Starting Database with different forms
| thread-index: AcSkrtKt+yc2bLa/R5yUopZf0U9jcg==
| X-WBNR-Posting-Host: 192.60.35.127
| From: "=?Utf-8?B?Tm9yYWg=?=" <[email protected]>
| Subject: Starting Database with different forms
| Date: Mon, 27 Sep 2004 09:27:03 -0700
| Lines: 18
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.access.macros
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.access.macros:33490
| X-Tomcat-NG: microsoft.public.access.macros
|
| I would like to start access (MS Access 2000) in a forms view based on
the
| CurrentUsers permission level. For example. A user defined as a Manager
| would get the Manager's Main menu and Staff members would open to the
Staff's
| main menu. I've tried setting up an autoexec macro with conditions based
on
| a query that pulls the "class" (manager, staff) field out of the secured
| employee info but this is not working.
|
| using expression builder I get this
| [qry_Find_User_Class]![Emp_Class_ID] = "Manager"
|
| The query uses the criteria CurrentUser() to pull the Emp_Class_ID
| ("Manager", "Staff", etc..) from the secured Emp_Info table.
|
| This does not work.
|
| Any suggestions?
| --
| Never take life seriously. Nobody gets out alive, anyway.
|
 
Back
Top