SetFocus not working (1 Viewer)

TVReplay99

Registered User.
Local time
Today, 18:42
Joined
Jan 2, 2002
Messages
29
I can't seem to be able to get the setfocus comand to work. I have it in several differnt codes and on different forms and non work. Is is somethingto do with properties? I have tried every combination of enabled and disabled but can't get it. It is not a huge deal but it is very confussing.

Brian
 
R

Rich

Guest
Posting the code you've tried might be helpful, or did you not have a question:confused:
 

Oldsoftboss

AWF VIP
Local time
Tomorrow, 03:42
Joined
Oct 28, 2001
Messages
2,499
Put

Msgbox "Hello"

where you are calling the setfocus code, this will narrow down if the code is failing, or just failing to fire. Most times it is trial and error.

Dave
 

WayneRyan

AWF VIP
Local time
Today, 18:42
Joined
Nov 19, 2002
Messages
7,122
Brian,

You mentioned various combinations of enabled/disabled.
The .SetFocus just moves the "cursor" to a particular field.

Code:
If SomeCondition = True Then
   MsgBox("You must enter field x.")
   Me.Fieldx.SetFocus
End If

Wayne
 

Users who are viewing this thread

Top Bottom