我的思路是在REF()自定义方法中加入THISFORM.OPTION&..INTERACTIERCHANGE语句,可是每一篇只有一个选项按钮能进行顺利的替换,别的都不好使,为什么呢?肯请答复....
我是这样作的:
FORM1的自定义REF():
public nCnt
FOR nCnt=1 TO 6
cCnt=STR(nCnt,1)
GO TOP
SKIP (nPages-1)*6+nCnt-1
IF EOF()
THISFORM.LABEL&cCnt..VISIBLE=.F.
THISFORM.OPTIONGROUP&cCnt..VISIBLE=.F.
ELSE
THISFORM.LABEL&cCnt..VISIBLE=.T.
THISFORM.OPTIONGROUP&cCnt..VISIBLE=.T.
thisform.Optiongroup&cCnt..Interactivechange
*THISFORM.LABEL&cCnt..CAPTION="第"+ALLTRIM(STR(no))+"题:"+quiz_xz.question
THISFORM.LABEL&cCnt..CAPTION=quiz_xz.question
THISFORM.OPTIONGROUP&cCnt..OPTION1.CAPTION="A. "+choice_A
THISFORM.OPTIONGROUP&cCnt..OPTION2.CAPTION="B. "+choice_B
THISFORM.OPTIONGROUP&cCnt..OPTION3.CAPTION="C. "+choice_C
THISFORM.OPTIONGROUP&cCnt..OPTION4.CAPTION="D. "+choice_D
*THISFORM.OPTIONGROUP&cCnt..VALUE=AT(user_ans,"ABCD")
ENDIF
ENDFOR
各按钮组的INTERACTIVECHANGE()
go top
REPLACE USER_ANS WITH Substr("ABCD",THISFORM.OPTIONGROUP1.VALUE,1) reco (nPages-1)*6+nCnt-1
do case
case user_ans='A'
replace ans_no with choice_a
case user_ans='B'
replace ans_no with choice_b
case user_ans='C' .or. answer='C'
replace ans_no with choice_c
case user_ans='D'
replace ans_no with choice_d
endcase
do case
case answer='A'
replace ans_yes with choice_a
case answer='B'
replace ans_yes with choice_b
case answer='C' .or. answer='C'
replace ans_yes with choice_c
case answer='D'
replace ans_yes with choice_d
endcase
但还是同原来一样,只有这一页的最后一个记录能够的背替换,其它的都没有反应,而且它还说'记录超出范围',能不能再提示一下解决思路...