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!

call_form with login

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I created 7 forms and created a menu from where they can be called.
I also created a form as a launching pad for the application.
Now, I have created a password so that a user will need to login in before opening the launching pad and the login code works.
My two questions are:
1, how can I ensure that a user logs in with a username and password before opening certain forms?
I wrote a login trigger and tested it but when I try logging in, I get an error, 'you are already logged in'.
How can I fix this problem?
2, I will like to have the user's Id populated on any form he/she is opening up.
For instance, suppose the user has Id of 1 and name of 'Jane' but has a different login username and password, mu requirement is that as soon as he/she logs in, his/her id and name is displayed on the id/name text fields of the form he/she is working on.
Any help would be greatly appreciated.
sorry about the long ramblings.
 
1) I would suggest you create an ON-LOGON trigger in which you can control the logon. You need to use the Logon built-in to actually perform the login itself, but you must bear in mind the following points:

- If you use the Login built-in outside the ON-LOGON trigger, all it will do is make a call to ON-LOGON
- If you use Logon inside the ON-LOGON trigger the logon to the DB will then take place.
- If you are already logged on you will need to use Logout first before the Logon.

2) You could use global variables to pass the name and ID around any forms you start in the same runtime session. Or you could pass them by adding a name and ID parameter to your forms.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top