MS access login form (2 database, 1 login form) (1 Viewer)

JRMT

New member
Local time
Today, 23:54
Joined
Dec 3, 2020
Messages
16
Hi Sir/Maám need youre expertise please, here is the scenario i have 2 database ex. database1 and database2 both have login form. when you open database 1 you need to login, after logged in it has a button database2. when i clicked database 2 button it has a batch file that will actually open database2 and then you need to login again. heres my question is it possible that when i login in database1 when i open database2 i dont need to login anymore but the user that used to login in database1 will also reflect in database2.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 15:54
Joined
Feb 28, 2001
Messages
20,638
If you are in a situation where there is a formal domain login process (i.e. at a work environment) you can use your network login for both of them and not have to actually log in at all. (This is, in security terms, establishing a trust relationship between an app and the domain.)

If you do not have a formal domain but your users have to log in to their individual machines, as long as none of them log in as SYSTEM and as long as no one has a Windows without a login, you can look up their usernames.

If none of those apply to you, then the next possible thing is to have a one-record table in DB #2 that would normally receive the user's login from the login form if you used it for that DB. But have DB #1 map at least that table in DB #2 and fill it in. Doing that would mean that when your DB is about to exit, you need to wipe the table.

However, there is also a question about why two databases? Can you not merge them? The reason I ask this is because the old adage about "too many cooks spoil the broth" comes to mind.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:54
Joined
Oct 29, 2018
Messages
16,130
Hi. Welcome to AWF!

I think what you want is possible depending on how you have users log in. Can you describe that process, please?
 

JRMT

New member
Local time
Today, 23:54
Joined
Dec 3, 2020
Messages
16
Hi. Welcome to AWF!

I think what you want is possible depending on how you have users log in. Can you describe that process, please?
Sir thank you first the user will login to db1 and second after that they will click a button that will go to db2 and then they need to log in again using the credentials that they use to login in db1
 
Last edited:

JRMT

New member
Local time
Today, 23:54
Joined
Dec 3, 2020
Messages
16
If you are in a situation where there is a formal domain login process (i.e. at a work environment) you can use your network login for both of them and not have to actually log in at all. (This is, in security terms, establishing a trust relationship between an app and the domain.)

If you do not have a formal domain but your users have to log in to their individual machines, as long as none of them log in as SYSTEM and as long as no one has a Windows without a login, you can look up their usernames.

If none of those apply to you, then the next possible thing is to have a one-record table in DB #2 that would normally receive the user's login from the login form if you used it for that DB. But have DB #1 map at least that table in DB #2 and fill it in. Doing that would mean that when your DB is about to exit, you need to wipe the table.

However, there is also a question about why two databases? Can you not merge them? The reason I ask this is because the old adage about "too many cooks spoil the broth" comes to mind.
Thank you also Sir but we dont have formal domain and both db1 and db2 have their own login form and table login.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:54
Joined
Oct 29, 2018
Messages
16,130
Sir thank you first the user will login to db1 and second after that they will click a button that will go to db2 and then they need to log in again using the credentials that they use to login in db1
Yes, but how does that login process work. Is it using a table with all login information? Are the login the same for both databases?

In any case, you will probably have to modify both databases to accept "remote" login.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 15:54
Joined
Feb 28, 2001
Messages
20,638
the user will login to db1 and second after that they will click a button that will go to db2 and then they need to log in again using the credentials that they use to login in db1

both db1 and db2 have their own login form and table login.

This duplication of data is a headache waiting to happen. Does it ever happen that there is a difference in the list of users authorized to use DB1 vs. DB2? If the users always overlap, then you are doubling your maintenance work.

Are these databases individually single-file or split? If you are sharing the DB files among multiple users and have not split them into front-end and back-end files, you are risking file corruption due to what is called a "lock collision" that interferes with proper DB operation within the file system. This design might seem to make sense to you at a functional level but it risks operational headaches now and down the road.

Duplication of effort appears in another way here because of the separation of the two DBs that require two logins. Again, if the second DB is also not split, you have twice the chance of corruption due to usage collisions.

I want to be clear. My criticism is not about the content of EITHER database. I haven't seen it (and am not asking, by the way), so it might have the most elegant forms ever seen. My concern is with the infrastructure of having separated databases that double your maintenance work.
 

JRMT

New member
Local time
Today, 23:54
Joined
Dec 3, 2020
Messages
16
Yes, but how does that login process work. Is it using a table with all login information? Are the login the same for both databases?

In any case, you will probably have to modify both databases to accept "remote" login.
same database both have table login with all information and also same form login Sir.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:54
Joined
Oct 29, 2018
Messages
16,130
same database both have table login with all information and also same form login Sir.
Okay, it may not be too bad after all. So, all you have to do is modify the database to either accept a login from the original login form or through a remote request. For example, if you're opening DB2, it can check if DB1 is already open and request or retrieve login information from DB1. Or, if you're opening DB2 from DB1, maybe DB1 and pass the login info to DB2, so it's already available when DB2 starts. One way to do that is by using the /cmd switch when starting Access.
 

JRMT

New member
Local time
Today, 23:54
Joined
Dec 3, 2020
Messages
16
Okay, it may not be too bad after all. So, all you have to do is modify the database to either accept a login from the original login form or through a remote request. For example, if you're opening DB2, it can check if DB1 is already open and request or retrieve login information from DB1. Or, if you're opening DB2 from DB1, maybe DB1 and pass the login info to DB2, so it's already available when DB2 starts. One way to do that is by using the /cmd switch when starting Access.
Im so sorry Sir im just a newbie in Access can you tell me how am i actually do that Sir?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:54
Joined
Oct 29, 2018
Messages
16,130
Im so sorry Sir im just a newbie in Access can you tell me how am i actually do that Sir?
Not sure how I can tell you to modify something I can't see. Can you post a sample copy of your databases?
 

Users who are viewing this thread

Top Bottom