主题:怎样才能实现
我想在一个右键菜单的删除键中删除表单上表格控制里的一条当前记录,我是这样做的:在表单(form1)中自定一个方法,方法名为:scwj,代码如下:
SELECT ml
IF messagebox('确定删除选中记录吗?',4+32,"提示")=6
kk1=RECNO()
thisform.grid1.RecordSource=null
delete
PACK
SELECT ml
thisform.grid1.RecordSource='ml'
thisform.grid1.RecordSourceType=1
GO kk1
ENDIF
thisform.refresh()
菜单调用方法命令为:form1.scwj
错误提示为:找不到form1
我又在菜单中改为过程,代码如下:
SELECT ml
IF messagebox('确定删除选中记录吗?',4+32,"提示")=6
kk1=RECNO()
thisform.grid1.RecordSource=null
delete
PACK
SELECT ml
thisform.grid1.RecordSource='ml'
thisform.grid1.RecordSourceType=1
GO kk1
ENDIF
thisform.refresh()
错误提示为:thisform只能在方法程序中使用。
我又改为:
SELECT ml
IF messagebox('确定删除选中记录吗?',4+32,"提示")=6
kk1=RECNO()
form1.grid1.RecordSource=null
delete
PACK
SELECT ml
form1.grid1.RecordSource='ml'
form1.grid1.RecordSourceType=1
GO kk1
ENDIF
form1.refresh()
错误提示为:找不到form1
请问怎样才能实现这一理想?
SELECT ml
IF messagebox('确定删除选中记录吗?',4+32,"提示")=6
kk1=RECNO()
thisform.grid1.RecordSource=null
delete
PACK
SELECT ml
thisform.grid1.RecordSource='ml'
thisform.grid1.RecordSourceType=1
GO kk1
ENDIF
thisform.refresh()
菜单调用方法命令为:form1.scwj
错误提示为:找不到form1
我又在菜单中改为过程,代码如下:
SELECT ml
IF messagebox('确定删除选中记录吗?',4+32,"提示")=6
kk1=RECNO()
thisform.grid1.RecordSource=null
delete
PACK
SELECT ml
thisform.grid1.RecordSource='ml'
thisform.grid1.RecordSourceType=1
GO kk1
ENDIF
thisform.refresh()
错误提示为:thisform只能在方法程序中使用。
我又改为:
SELECT ml
IF messagebox('确定删除选中记录吗?',4+32,"提示")=6
kk1=RECNO()
form1.grid1.RecordSource=null
delete
PACK
SELECT ml
form1.grid1.RecordSource='ml'
form1.grid1.RecordSourceType=1
GO kk1
ENDIF
form1.refresh()
错误提示为:找不到form1
请问怎样才能实现这一理想?