主题:不执行,为什么???
USE 通讯录.dbf
LOCATE FOR 姓名=THISFORM.PAGEFRAME1.PAGE1.TEXT1.VALUE
IF found()
X1=messagebox("此人资料已存在!",48,"提示窗口")
thisform.pageframe1.page1.text1.value=""
thisform.pageframe1.page1.text2.value=""
thisform.pageframe1.page1.text3.value=""
thisform.pageframe1.page1.text4.value=""
thisform.pageframe1.page1.text5.value=""
thisform.pageframe1.page1.text6.value=""
thisform.pageframe1.page1.optiongroup1.option1.value=0
thisform.pageframe1.page1.optiongroup1.option2.value=0
thisform.pageframe1.page1.text1.setfocus
ELSE
IF EMPTY(thisform.pageframe1.page1.text1.value)
X2=messagebox("联系人姓名不能为空!",48,"提示信息")
ELSE
append blank
replace 姓名 with thisform.pageframe1.page1.text1.value
replace 单位 with thisform.pageframe1.page1.text2.value
replace 手机 with thisform.pageframe1.page1.text3.value
replace 小灵通 with thisform.pageframe1.page1.text4.value
replace 座机 with thisform.pageframe1.page1.text5.value
replace 备注 with thisform.pageframe1.page1.text6.value
IF thisform.pageframe1.page1.optiongroup1.option1.value=1
replace 性别 with "男"
ELSE
replace 性别 with "女"
ENDIF
X3=messagebox("资料已成功保存!",48,"信息窗口")
thisform.pageframe1.page1.text1.value=""
thisform.pageframe1.page1.text2.value=""
thisform.pageframe1.page1.text3.value=""
thisform.pageframe1.page1.text4.value=""
thisform.pageframe1.page1.text5.value=""
thisform.pageframe1.page1.text6.value=""
thisform.pageframe1.page1.optiongroup1.option1.value=0
thisform.pageframe1.page1.optiongroup1.option2.value=0
thisform.pageframe1.page1.text1.setfocus
ENDIF
ENDIF
USE
问题是: 为什么不执行LOCATE FOR 姓名=THISFORM.PAGEFRAME1.PAGE1.TEXT1.VALUE。
就是通讯录.DBF中已存在的记录,LOCATE FOR 姓名=THISFORM.PAGEFRAME1.PAGE1.TEXT1.VALUE找不到呢?
LOCATE FOR 姓名=THISFORM.PAGEFRAME1.PAGE1.TEXT1.VALUE
IF found()
X1=messagebox("此人资料已存在!",48,"提示窗口")
thisform.pageframe1.page1.text1.value=""
thisform.pageframe1.page1.text2.value=""
thisform.pageframe1.page1.text3.value=""
thisform.pageframe1.page1.text4.value=""
thisform.pageframe1.page1.text5.value=""
thisform.pageframe1.page1.text6.value=""
thisform.pageframe1.page1.optiongroup1.option1.value=0
thisform.pageframe1.page1.optiongroup1.option2.value=0
thisform.pageframe1.page1.text1.setfocus
ELSE
IF EMPTY(thisform.pageframe1.page1.text1.value)
X2=messagebox("联系人姓名不能为空!",48,"提示信息")
ELSE
append blank
replace 姓名 with thisform.pageframe1.page1.text1.value
replace 单位 with thisform.pageframe1.page1.text2.value
replace 手机 with thisform.pageframe1.page1.text3.value
replace 小灵通 with thisform.pageframe1.page1.text4.value
replace 座机 with thisform.pageframe1.page1.text5.value
replace 备注 with thisform.pageframe1.page1.text6.value
IF thisform.pageframe1.page1.optiongroup1.option1.value=1
replace 性别 with "男"
ELSE
replace 性别 with "女"
ENDIF
X3=messagebox("资料已成功保存!",48,"信息窗口")
thisform.pageframe1.page1.text1.value=""
thisform.pageframe1.page1.text2.value=""
thisform.pageframe1.page1.text3.value=""
thisform.pageframe1.page1.text4.value=""
thisform.pageframe1.page1.text5.value=""
thisform.pageframe1.page1.text6.value=""
thisform.pageframe1.page1.optiongroup1.option1.value=0
thisform.pageframe1.page1.optiongroup1.option2.value=0
thisform.pageframe1.page1.text1.setfocus
ENDIF
ENDIF
USE
问题是: 为什么不执行LOCATE FOR 姓名=THISFORM.PAGEFRAME1.PAGE1.TEXT1.VALUE。
就是通讯录.DBF中已存在的记录,LOCATE FOR 姓名=THISFORM.PAGEFRAME1.PAGE1.TEXT1.VALUE找不到呢?