 |
摘自《远程续缘》第30期(http://jfzcc.yeah.net)
输入完后用如下语句检查:
bm=dist
jlh=recno()
locate for dist=dist .and. .not. recno()#jlh
if found()
messagebox(`输入值重复!`,64,`注意`)
endif
goto jlh
再问:我是在Grid中输入的,上叙的程序应该在什麽事件中执行?谢谢!
再答:在grid下面的column下面的text的lostfocus事件中。
宁静人生的意见:
下列程式在SAVE按键CLICK()事件中执行
DO WHILE !EOF("rs_otln")
TMP_NO=RECNO("rs_otln")
TMP_ITEM=rs_otln.w_no
DO WHILE !EOF("rs_otln")
SKIP 1 IN rs_otln
IF TMP_ITEM=rs_otln.w_no
Messagebox("员工记录不能重复!",MB_ICONINFORMATION,AOMS_LOC)
GO TOP IN RS_OTLN
retu
ENDIF
ENDDO
GO (TMP_NO) IN rs_otln
SKIP 1 IN rs_otln
ENDDO
此问题由远程续缘回答。
附加关键字:编程, 源程序, programming, source code, FoxPro/Visual FoxPro, Foxbase, dBase, xbase, FoxPro, VFP, Visual FoxPro, DBGrid, dbgrid, dbcombo。
|