what would you need to know to help you be more definitive with your solution?
Main Topics
Browse All TopicsI need the code to create a login form that checks the user name and password against data stored in the database. Which gives it a set number and from the number it views data from a different set. I have about 20 different sets and they have 9 tables in each set. The data CANNOT be combined into one table. I need the switch board to access that set number that corrisponds to the user that is logged in.
In other word. The user will login in and view the data set that corrisponds to his user.
So basically I am looking to use the same forms and switch board and just change the control source depending on the User's given set.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Basically everything,
ie Are the tables local or linked, What are the record sources ie queries, tables etc , How they differ or more so how are they similar, The login form, etc etc
for example. If the tables are linked tables in a backend database then it may be possible to simply modify the connection settings for the linked tables based on the user logon.
How do the recordsources of your forms differ. ie is the record source like Customers1, Customers2 , Customers3 etc based on the set to be used. If so you could simply use code similar to thie in the forms load event - me.recordsource = "Customers" & usrNo for example
You could also create a function to set the forms recordsource eg Recordsource = SetRecordset(usrNo).
As I said there are many ways to do it, all depends on how your application works.
From the sound of your requirements I would suggest that the Backend Data be seperated from the front end and use the Change Connection settings option above. However I am flying blind and just guessing.
Leigh
http://www.databasedev.co.
Im still here, if you want....here is the raw database WITHOUT the article i was intending to write. Remove the extra extension within the archive for office 2007 database.
NOTE. I will be finishing this library databse and publishing my article here at Access 2007 Login with Security Trimming.
The Login ID is admin and password is P@$$w0rd. Oh and all passwords are SHA256 hashed just like in .Net. Give it a go.
The EULA that you see is for YOU to customize (notice the control parameters in the text object area) this will display to your users the first time they load the database on a new machine for THEM to approve before using the database. The eulas are all stored in the tbl_Licenses.
As i have added alot more than you asked for if you have any continued questions allow me time to complete the article and publish it here. I hope you like this.
Gosh...there is so much to talk about and i havent even fully completed what the database was intended to illustrate. Security trimming will be implented through the membership.isinrole function...although this endeavor was an attempt to approximate the .Net libraries in Access. this is by no means a proper representation of the framework, mearly an approximation.
Business Accounts
Answer for Membership
by: ldunscombePosted on 2009-09-24 at 16:33:49ID: 25418973
You could create a public variable eg Public usrNo
then on your login form set usrNo to a value that represents the data set they are allowed to use. eg users in group 1 may be required to use data set 1 so for each user that needs data set 1 you would set usrNo to 1
Then in the onload event of your forms you would set the recordsource based on the value of usrNo.
eg
select case usrNo
Case 1
me.recordsource = "[Whatever the recordsource for users in group 1 should be]"
Case 2
me.recordsource = "[Whatever the recordsource for users in group 2 should be]"
Case 3
me.recordsource = "[Whatever the recordsource for users in group 3 should be]"
etc etc
end select
Just 1 possibility. Many others, Hard to give a difinitive answer with such limited information.
Leigh