|
-
Nov 15th, 2000, 05:35 AM
#1
Thread Starter
Fanatic Member
If when a control recieves focus a certain condition is met, is it possible to set focus back to the control which previously had focus?
VB6 sp5, SQL Server 2000, C#
There are no stupid questions. Only stupid people. 
-
Nov 15th, 2000, 06:04 AM
#2
Fanatic Member
Use LostFocus to set a reference to the control you are moving away from and then just use that reference to set the focus back there...
i.e.
Code:
Dim ctl As Control
Sub SomeControl_LostFocus
Set ctl = Me.SomeControl
End Sub
Sub OtherControl_GotFocus
If Condition Then
ctl.SetFocus
End If
End Sub
Cheers,
P.
Not nearly so tired now...
Haven't been around much so be gentle...
-
Nov 15th, 2000, 06:22 AM
#3
Thread Starter
Fanatic Member
Quality, Cheers.
VB6 sp5, SQL Server 2000, C#
There are no stupid questions. Only stupid people. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|