Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing Focus on a form
Message
From
07/05/2002 22:48:46
 
 
To
07/05/2002 22:36:33
Mike Smith
Doncaster Office Services
Oakville, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00653825
Message ID:
00653828
Views:
19
Mick,

Try -
THISFORM.GRDHILIT1.column(1).controls(2).SETFOCUS()



>I am attempting the create a "pattern" section in a search box above a grid.
>
>The grid has one column with a list of names.
>
>The pattern field asks the user to enter a few characters of the person's name then press ENTER. MEM1 is the name of the variable in the pattern field.
>
>The key press code for the pattern field is below:
>
>IF NKEYCODE = 13 && enter
> SET EXACT OFF
> LOCATE FOR UPPER(TEACHER) = UPPER(TRIM(MEM1))
> IF FOUND()
> THISFORM.GRDHILIT1.SETFOCUS()
> ELSE
> LOCATE FOR UPPER(TRIM(MEM1)) $ UPPER(TEACHER)
> IF FOUND()
> THISFORM.GRDHILIT1.SETFOCUS()
> ELSE
> WAIT WINDOW "Name not found"
> GO TOP
> THISFORM.GRDHILIT1.SETFOCUS()
> ENDIF
> ENDIF
>ENDIF
>
>This code provides a momentary focus on the Grid then it returns back to the pattern box.
>
>How do I get the focus to stay on the Grid?
>
>Mike Smith
Manoj Karki
manoj0karki@yahoo.com
Nepal
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform