Hi John.
Where are your options coming from? And what version of VFP?
I'll assume from a list of values and VFP5 for now...Anyway, set the Value at design time to the first item (for the example, items are Apples, Oranges, and Bananas). The following code goes into the KeyPress event of the Textbox:
LPARAMETERS nKeyCode, nShiftAltCtrl
IF nKeyCode=32
DO CASE
CASE THIS.Value="Apples"
THIS.Value="Oranges"
CASE THIS.Value="Oranges"
THIS.Value="Bananas"
CASE THIS.Value="Bananas"
THIS.Value="Apples"
ENDCASE
ENDIF
NODEFAULT
If the source of the items is a table, do a SKIP on the table until EOF then go top and set the Value to the appropriate field.
>Hey FoxFolx -
>We used to be able to have a pre-determined list of options in a text box by using the PICTURE clause with '@M Option1,Option2,Option3'. I can't seem to figure out how to do it with VFP Text Controls.
>
>I know I could use a Drop Down, but the real estate is very cramped. Is this still possible with VFP?
>
>Thanks in advance!
>
>- John Kiernan
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05