In the Combobox.KeyPress I put the following IF nKeyCode=5 OR nKeyCode=24 &&UPARROW or DNARROW This.Style=0 &&Set Style to Dropdown Combo DODEFAULT() ENDIF In the Combobox.Valid I put This.Style=2 &&Set Style to Dropdown ListI did a Trace Events and discovered the following:
**Code directly in combobox on form myform.KeyPress(24,0) myform.mycombo.KeyPress(24,0) myform.mycombo.text1.KeyPress(24,0) myform.Paint() myform.KeyPress(24,0) myform.mycombo.Valid() myform.mycombo..text1.Destroy() myform.mycombo.LostFocus() **Code in class/ class used on form myform.KeyPress(24,0) myform.mycombo.KeyPress(24,0) <strong>myform.mycombo.text1.KeyPress(0,8) myform.Paint() myform.mycombo.InteractiveChange()</strong> myform.mycombo.text1.KeyPress(24,0) myform.Paint() myform.KeyPress(24,0) myform.mycombo.Valid() myform.mycombo..text1.Destroy() myform.mycombo.LostFocus()3 extra events, shown in bold, are occurring when used as a class. I know these are the cause of the problem but I have no idea why they are occurring. Any help greatly appreciated, I'm going bald pulling my hair out over this one. TIA