The problem was indeed in the Keypress event. I solved it by adding the NODEFAULT code in each appropriate case as shown below:
**class txtDate.Keypress()
LPARAMETERS nKeyCode, nShiftAltCtrl
do case
case nKeyCode=13 or nKeyCode=9 && Enter
This.Parent.spnDate.Enabled = .f. && disable the spinner so cursor goes to next enabled control
=dodefault()
case nKeyCode = 5 && Up Arrow, add day
This.Value = This.Value + 1
nodefault
case nKeyCode = 24 && Down Arrow, subtract day
This.Value = This.Value - 1
nodefault
case nKeyCode = 18 && Page Up, add month
This.value = gomonth( This.Value , 1 )
nodefault
case nKeyCode = 3 && Page Down, subtract month
This.value = gomonth( This.Value , -1 )
nodefault
endcase
Thanks for pointing me in the correct direction.
Denis
>>I am using VFP 5.0a.
>>I have a container class with a textbox and spinner. The class works exactly like I want on the form, except I cannot ENTER or TAB out of the control. I am able to click on any other control and it works fine.
>>Any ideas?
>>
>>Denis Schuette
>
>Are you sure you don't have some code in the KeyPress for that control?
Dennis Schuette