I have a set of programs that all access a DB2 server ( AS400 ). In each program I end up coding an identical login form that accepts a username and password which is then validated against the DB2 user profile database.
I think I should create this login as a stand alone program that I can call from each of my projects. The program just
needs to return a 'valid user' or 'invalid user' value.
I could set up a Class Module and copy it into each program but can Class Modules have forms in them?
Is there a way of creating the effect of a class module instance with a form as a common program so I can use my
common login program like this?
Sub Proc MyProject
'
' Call logon method in DB2Server program to display
' a form, accept a usename textbox, accept a password
' textbox and validate it against the AS400 before
' returning a booleanvalue of True or False.
'
blnLoggedOn = DB2Server.LogOn ' Program & Method
'
' If Valid UserName & Password
If ReturnCode = True Then
.
. Do Processing
.
Endif
End Proc
I think I should create this login as a stand alone program that I can call from each of my projects. The program just
needs to return a 'valid user' or 'invalid user' value.
I could set up a Class Module and copy it into each program but can Class Modules have forms in them?
Is there a way of creating the effect of a class module instance with a form as a common program so I can use my
common login program like this?
Sub Proc MyProject
'
' Call logon method in DB2Server program to display
' a form, accept a usename textbox, accept a password
' textbox and validate it against the AS400 before
' returning a booleanvalue of True or False.
'
blnLoggedOn = DB2Server.LogOn ' Program & Method
'
' If Valid UserName & Password
If ReturnCode = True Then
.
. Do Processing
.
Endif
End Proc