Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Having Multiple Switchboards

Status
Not open for further replies.

BlackTL

Technical User
Aug 11, 2003
29
US
Hi All,

I am trying to see if I can create multiple switchboards in MS Access 97. In the beginning, we only had two groups of users and I just had two separate clients but now there are five types of users. It would be easier for me if depending on their group level, direct each group to their respective switchboard. Is this possible? If not, what can I do to accomplish this?

Thank you,
Roshan Patel
 
BlackTL
I have dealt with a similar problem. I have a couple of Dbases that I use with multiple users, each with different levels of access. Before I start pasting code to you, can you be a little more elaborate with the problem. ie can you define your "user groups" and "clients".

With my databases, I don't use the Access switchboard. Instead I create my own switchboard by using a form that is not linked to any table or query. I then add labels and attach some code to them to allow me to open up the respective forms or reports etc.

Now, with users, when I open my database the start up form goes through a series of codes and determines if the user is allowed to use the database and then directs them to their area of the database.

If this is what you need, reply to this and I'll attempt to extract all of the code and explain where it goes.

Cheers

Jedel
 
Hi Jedel,

I have five groups of users:

1 - Read Only Access to Rectification forms
2 - Access to Account Opening Forms
3 - Access to Rectification Forms
4 - Access to KYC Forms
5 - Access to Sales Support Forms

All of these users will also have certain forms that are generic and must be available to each group.

What I wanted to do, was create multiple switchboards and have them linked with all the forms that each group would need. Then depending on the user level, they would be directed to a certain switchboard.

Let me know if you need more information.

Rosh
 
Black TL,
Ok, my next question (i probably should have asked this before) these users, are they set up in a table on your database? or do you use the MS Access Security.

The reason I ask is that I don't use the Access security. All of my users are set up in a separtate table so I can refer to the data and provide the required access levels using the "Select Case".
ie. I have a User table with the user first and last name, his NT login ID, Access level, authority level and Position.

When the database starts it checks the NT user id against the person logged onto the computer. If this doesn't match, they can't get in.

If it does match, then it will check what their Access, Authority and position is and open the appropriate forms.

Unfortunately, if you are using Access Security, I cant help you.

Cheers

Jedel
 
Jedel, the way I did it was that all information is stored into a table like yours.

Rosh
 
Black TL

Then all you need to do is provide a name for each level, or user for example with your 5 groups, you could name them:

1. RectRO
2. Account
3. Rect
4. KYC
5. Sales

These are just names, you can make them what ever you want.
What you will need to do first is create a startup form. I usually call mine "login_frm". in this form is a simple unbound filed, and some code that gets the current user id from the computer and places it into the field. A second form then opens that is attached to a query that opens the user record that matches the user id in the login form. I call this form "access_frm". In this form has all of the position and access level names. I keep this form open while the database is open as this is the information that is refered to all of the time. I just hide the form, you can do this by writing some code.

Now, the "Switchboards". Don't use the MS Access switchboard function. I found them to be very limiting. Instead create your own forms, but don't accociate them with any tables. Place labels on the form that will eventually point to the forms that each client needs to access.

I usually start with 1 main switchboard and then split it up from there, but if you want each client to have there own, you can include the code in the "access_frm" on open function.

I don't know how familiar you are with writing code but the select case is pretty simple. It should look something like this

Dim access as String
access = me.posn '(posn being the reference to where the client can go)

Select case access

Case "rectRO"
Docmd.openform("Switchboard for client_frm")

Case "Account"
Docmd.openforn(Switchboard for Account_frm")

Case"KYC"

etc....

End Select

When the database opens, it should firstly get the user id from the workstation, then open the matching date in the access form and then open the correct form for the client.

Now as you can probably see, this involves creating quite a number of forms. If you like I will create a step by step instructions for you, but it may take some time.

Hope this helps

Jedel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top