SetFocus not working

TVReplay99

Registered User.
Local time
Today, 21:50
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
 
Posting the code you've tried might be helpful, or did you not have a question:confused:
 
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
 
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

Back
Top Bottom