C
Craig Buchanan
I would like to create a logon form that act like the common dialog form.
The logon form should open as modal, wait for input, then pass data back to
the calling code. moreover, the calling code should wait for the logon form
to close before continuing. i would like to use the New sytax (more object
oriented) if possible. I've defined the logon form as modal and popup. for
some reason, the calling code (Command1_Click) doesn't wait for the logon
form.
What am i missing?
Thanks.
<code>
Sub Command1_Click
Dim UID,PWD
....
Dim frm As New Form_frmAuthenticate
With frm
.DialogTitle = "Login"
'code should wait here for user to enter infomation in
frmAuthenticate, then click OK
.ShowOpen
'exit if form is cancelled
If .Cancelled Then Goto MemberExit
'gather relevant properties
UID=.UserId
PWD=.Password
End With
MemberExit:
Set frm = Nothing
....
End Sub
</code>
The logon form should open as modal, wait for input, then pass data back to
the calling code. moreover, the calling code should wait for the logon form
to close before continuing. i would like to use the New sytax (more object
oriented) if possible. I've defined the logon form as modal and popup. for
some reason, the calling code (Command1_Click) doesn't wait for the logon
form.
What am i missing?
Thanks.
<code>
Sub Command1_Click
Dim UID,PWD
....
Dim frm As New Form_frmAuthenticate
With frm
.DialogTitle = "Login"
'code should wait here for user to enter infomation in
frmAuthenticate, then click OK
.ShowOpen
'exit if form is cancelled
If .Cancelled Then Goto MemberExit
'gather relevant properties
UID=.UserId
PWD=.Password
End With
MemberExit:
Set frm = Nothing
....
End Sub
</code>