at thisform.text1.value i put this code i have only 2 textbox at my form and 5 commands buttos , ACT_FLAG=3 for delete ACT_FLAG=1 for add new ACT_FLAG=2 for edit ---------------------------------------------- ACT_FLAG=4 for query still &&as delete without delete ACT_FLAG=3 for report still && i can do it CLOSE all USE store IN 0 *? ACT_FLAG *WAIT IF ACT_FLAG=3 LOCATE FOR STOReID=UPPER(ALLTRIM(THISFORM.TEXT1.VALUE)) IF FOUND() THISFORM.TEXT1.VALUE=STOREID THISFORM.TEXT2.VALUE=description DELETE FOR STOReID=UPPER(ALLTRIM(THISFORM.TEXT1.VALUE)) pack ELSE =MESSAGEBOX("not found") ENDIF ENDIF *------- IF ACT_FLAG=1 LOCATE FOR STOReID=UPPER(ALLTRIM(THISFORM.TEXT1.VALUE)) IF !FOUND() M.STOREID=UPPER(ALLTRIM(THISFORM.TEXT1.VALUE)) M.description=THISFORM.TEXT2.VALUE APPEND blank replace storeid WITH M.STOREID,description WITH m.description FOR STOReID=UPPER(ALLTRIM(THISFORM.TEXT1.VALUE)) ENDIF ENDIF *--------- IF act_flag=2 *CLOSE all *USE store IN 0 LOCATE FOR STOReID=UPPER(ALLTRIM(THISFORM.TEXT1.VALUE)) IF FOUND() M.STOREID=UPPER(ALLTRIM(THISFORM.TEXT1.VALUE)) M.description=THISFORM.TEXT2.VALUE replace storeid WITH M.STOREID,description WITH m.description FOR STOReID=UPPER(ALLTRIM(THISFORM.TEXT1.VALUE)) BROWSE ELSE =MESSAGEBOX("not found") ENDIF ENDIF>I would recommand NOT to use the wizard if you need to modiy what the code does. I have been through what you are trying to achieve, the wizard code works if you don't modify it, and if you decide to modify you have to understand the impact it will have on the rest of the wizard code. But if you still want to use this code, I would recommend not to modify the parent class code (which is part of VFP framework), but rather copy the parent class code into you click event, and modify that, this way you will not change the behavior of the parent class.
>>#DEFINE C_WIZSTYLE "WIZBTNS.VCX" >>#DEFINE C_WIZDIR "WIZARDS\" >>#DEFINE C_PROMPT1_LOC "Find: " >>#DEFINE E_NOSTYLE_LOC "The class library (WIZBTNS.VCX) needed by this form could not be found. "+; >> "Please locate." >> >>LOCAL cGridRef,cWizHomePath,separator,cWizStyFile >> >>IF TYPE('THIS.Parent') # "O" >> RETURN >>ENDIF >> >>IF SET("TALK") = "ON" >> SET TALK OFF >> THIS.oldTalk = "ON" >>ELSE >> THIS.oldTalk = "OFF" >>ENDIF >> >> >>IF ATC(C_WIZSTYLE,SET("CLASSLIB")) = 0 >> >> * Returns just the pathname >> cWizHomePath = _WIZARD >> IF '\' $ cWizHomePath >> cWizHomePath = SUBSTR(m.cWizHomePath,1,RAT('\',m.cWizHomePath)) >> IF RIGHT(m.cWizHomePath,1) = '\' AND LEN(m.cWizHomePath) > 1 ; >> AND SUBSTR(m.cWizHomePath,LEN(m.cWizHomePath)-1,1) <> ':' >> cWizHomePath = SUBSTR(m.cWizHomePath,1,LEN(m.cWizHomePath)-1) >> ENDIF >> ELSE >> cWizHomePath = '' >> ENDIF >> >> * Add a backslash unless there is one already there. >> separator = IIF(_MAC,":","\") >> IF !(RIGHT(m.cWizHomePath,1) $ '\:') AND !EMPTY(m.cWizHomePath) >> m.cWizHomePath= m.cWizHomePath+ m.separator >> ENDIF >> >> DO CASE >> CASE FILE(C_WIZSTYLE) >> cWizFile = C_WIZSTYLE >> CASE FILE(m.cWizHomePath+C_WIZSTYLE) >> cWizFile = m.cWizHomePath+C_WIZSTYLE >> CASE FILE(m.cWizHomePath+C_WIZDIR+C_WIZSTYLE) >> cWizFile = m.cWizHomePath+C_WIZDIR+C_WIZSTYLE >> CASE FILE(HOME()+C_WIZSTYLE) >> cWizFile = HOME()+C_WIZSTYLE >> CASE FILE(HOME()+C_WIZDIR+C_WIZSTYLE) >> cWizFile = HOME()+C_WIZDIR+C_WIZSTYLE >> OTHERWISE >> =MESSAGEBOX(E_NOSTYLE_LOC) >> cWizFile = GETFILE("VCX",C_PROMPT1_LOC+C_WIZSTYLE) >> ENDCASE >> >> IF ATC(C_WIZSTYLE,m.cWizFile)#0 >> SET CLASS TO (m.cWizFile) ADDITIVE >> ELSE >> * Failed to get WIZSTYLE.VCX file >> RETURN .F. >> ENDIF >> >>ENDIF >> >>THIS.InitVars() >> >>IF THIS.lStartTop AND !EMPTY(ALIAS()) >> GO TOP >>ENDIF >> >>THIS.ButtonRefresh() >>THIS.NavRefresh() >> >>cGridRef=THIS.GridRef >>IF !EMPTY(m.cGridRef) >> * Change this if you desire to have the grid initially selected. >> * THISFORM.&cGridRef..SetFocus() >>ENDIF >> >>>>
DODEFAULT() >>> &&& New code here>>>