************************************************** >*-- Class: mycombo_edit (c:\temp\test.vcx) >*-- ParentClass: combobox >*-- BaseClass: combobox >* >DEFINE CLASS mycombo_edit AS combobox > > > Height = 22 > Width = 100 > DisabledBackColor = RGB(255,255,255) > aliasname = "None" > fieldname = "None" > Name = "mycombo_edit" > > > PROCEDURE When > THIS.REQUERY > ENDPROC > > > PROCEDURE LostFocus > Do While occurs(" ",this.displayvalue) > 0 > this.displayvalue = strtran(this.displayvalue," "," ") > Enddo > This.displayvalue = Upper(Chrtran(Alltrim(This.displayvalue),"yi","IY")) > this.value = this.displayvalue > ENDPROC > > > PROCEDURE Init > WITH This > .rowsourcetype = 3 > if lower(.fieldname)="none" or ; > lower(.aliasname)="none" > .fieldname = substr(.controlsource,rat(".",.controlsource)+1) > .aliasname = substr(.controlsource,1,; > rat(".",.controlsource)-1) > endif > .rowsource = [SELECT DISTINCT ]+THIS.fieldname +; > [ as dummy FROM ]+this.aliasname+[ where !empty(]+THIS.fieldname + ; > [) union ] +; > [SELECT this.displayvalue as dummy ] +; > [ FROM ]+this.aliasname + ; > [ INTO cursor qq order by 1 ] > ENDWITH > ENDPROC > > >ENDDEFINE >* >*-- EndDefine: mycombo_edit >**************************************************Cetin