473,402 Members | 2,053 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

ms access Startup

Kay
Hi

I am using access 2000. I have created a database and have applied the
security feature available as Ive got 2 different groups of users. I
have a 'managers options' and 'users options' forms in the database.
Is there any way that when the database starts up that I can open one
of these forms depending on the user signing in
e.g if a user signs in, the user options for to run at startup and if a
manager signs in, a managers options form to run at startup.

Any help is much appreciated

Mar 27 '06 #1
3 1774
"Kay" <kh******@hotmail.com> wrote in message
news:11*********************@g10g2000cwb.googlegro ups.com...
Hi

I am using access 2000. I have created a database and have applied the
security feature available as Ive got 2 different groups of users. I
have a 'managers options' and 'users options' forms in the database.
Is there any way that when the database starts up that I can open one
of these forms depending on the user signing in
e.g if a user signs in, the user options for to run at startup and if a
manager signs in, a managers options form to run at startup.

Any help is much appreciated


Yes you can use the CurrentUser method to return the name of the current
user of the database in your main form's Open event:

If CurrentUser = "MyUserName" Then
'Do something
Else
'Do something else
End If

HTH - Keith.
www.keithwilby.com
Mar 27 '06 #2
Hi,
For my opinion:
1) It will be better if you manage the users with tables like
"tblUsers" if you do so ignore this step.
2) On 'tblUsers' you shall add another field except UserName & Password
, "Status".. this field will determine if the user is 'manager' or
'user'
3) Then you shall create "Main Form" that will get user's details
like(Password,UserName..) and when you get the user details you shall
check on 'tblUsers' if it is 'manager' or 'user' and this form will
open the correct form for the specific user.

** There's another options by use "Environ" function for identify the
current user/computer..
If u have a users Table,

Mar 27 '06 #3
On 27 Mar 2006 03:21:09 -0800, "Kay" <kh******@hotmail.com> wrote:
Hi

I am using access 2000. I have created a database and have applied the
security feature available as Ive got 2 different groups of users. I
have a 'managers options' and 'users options' forms in the database.
Is there any way that when the database starts up that I can open one
of these forms depending on the user signing in
e.g if a user signs in, the user options for to run at startup and if a
manager signs in, a managers options form to run at startup.
If you'd prefer to do this dependant on the Group membership, you'd do something like this:

'/this was taken from the MS Security FAQ:
http://support.microsoft.com/default...#_Toc493299691

Function faq_IsUserInGroup (strGroup As String, strUser as String) As Integer
' Returns True if user is in group, False otherwise
' This only works if you're a member of the Admins group.
Dim ws As WorkSpace
Dim grp As Group
Dim strUserName as string

Set ws = DBEngine.Workspaces(0)
Set grp = ws.Groups(strGroup)
On Error Resume Next
strUserName = ws.groups(strGroup).users(strUser).Name
faq_IsUserInGroup = (Err = 0)
End Function

So in your startup routine:

If faq_IsUserInGroup("managers", CurrentUser) Then
DoCmd.OpenForm "managers options"
Else
DoCmd.OpenForm "users options"
End If

Any help is much appreciated


Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
Mar 27 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jack MacDonald | last post by:
This is very strange and disturbing. Last night I opened the FE of my development version of an A97 database and immediately received a Windows-level error message titled "msaccess.exe Application...
1
by: John Michael | last post by:
I have created some password routines to protect certain forms from access without a password. This allows me to create some security for apps that will be used on diff machines for users that...
5
by: Andy P via AccessMonster.com | last post by:
I am responsible for maintaining our departmental intranet pages at work. I would like to put a link from our website to a MS Access database which is held on our Network drive. The problem I...
9
by: badboybrown | last post by:
Hello, Is it possible to step through the "Create MDE" process and see what is causing Access to crash? I tried, unsuccessfully, many times to create an MDE from my database. But, randomly, I...
38
by: Oldie | last post by:
I have built an MS Access Application under MS Office XP (but I also own MS Office 2000). I have split the application in the pure database tables and all the queries, forms, reports and macro's. ...
12
by: rdemyan via AccessMonster.com | last post by:
I'm having a complicated linking problem. Before I get into the particulars, I'd like to know how Access links to the back-end file at startup, AFTER I've distributed my application to the client....
2
by: rdemyan via AccessMonster.com | last post by:
I have a custom message form that I want to display when the user shuts down my app. Some clean up needs to be done during shutdown and I want to display this form and then display various...
8
by: ajos | last post by:
hi frnds, im trying to convert my servlets database configuration from ms access to mysql database.however im getting some error like no driver found exception. to verify this error ive...
4
by: Bod | last post by:
Hi Folks, I've produced an Access application that reads the users login name from their environmental settings and then acquires their full name and department from the "Startup" table, to display...
7
by: Robert S. | last post by:
Searching some time now for documents on this but still did not find anything about it: Is it possible to replace the entry screen of MS Office Access 2007 - that one presenting that default...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.