求教:必须指定额外函数??怎么解决???

发现代码 2012-03-28 04:59:28
我有一个表,建了一个表单向表里追加记录(记录录入表单),在单击保存进行测试的时候就出现了:"必须指定额外函数".下面将表结构和添加及保存代码贴出来,请高手指点(不知图片传不传得上来).
一,表结构图:


二,出现问题窗口图:



三,添加按钮代码:
thisform.text1.ControlSource=""
thisform.text2.ControlSource=""
thisform.text3.ControlSource=""
thisform.text4.ControlSource=""
thisform.text11.ControlSource=""
thisform.text12.ControlSource=""
thisform.text13.ControlSource=""
thisform.edit1.ControlSource=""
thisform.edit3.ControlSource=""
thisform.text1.Value = thisform.text1.Value +1
thisform.text6.Value = thisform.text6.Value +1

thisform.text3.Value=""
thisform.text4.Value=""
thisform.text5.Value=ALLTRIM(str(YEAR(DATE())))
thisform.text11.Value=""
thisform.text12.Value=""
thisform.text13.Value=3
thisform.edit1.Value=""
thisform.edit3.Value=""
thisform.olecontrol2.visible= .T.

thisform.combo1.Enabled= .T.
thisform.combo2.Enabled= .T.
thisform.combo6.Enabled= .T.

this.Enabled= .f.
thisform.command1.Enabled=.t.
thisform.command2.Enabled=.t.
thisform.commandgroup1.command1.Enabled=.f.
thisform.commandgroup1.command2.Enabled= .f.
thisform.commandgroup1.command3.Enabled= .f.
thisform.commandgroup1.command4.Enabled= .f.
thisform.commandgroup1.command7.Enabled= .f.
thisform.commandgroup1.command5.Enabled= .t.
thisform.commandgroup1.command14.Enabled= .t.
thisform.commandgroup1.command15.Enabled= .t.

四,保存按钮代码:

djh=thisform.text1.Value
dqzh=ALLTRIM(thisform.text2.Value)
dzrz=ALLTRIM(thisform.text3.Value)
dwh=ALLTRIM(thisform.text4.Value)
dtm=ALLTRIM(thisform.edit1.Value)
dbgqx=ALLTRIM(thisform.text11.Value)
drq=ALLTRIM(thisform.text12.Value)
dys=thisform.text13.Value
dgdnd=thisform.text5.Value
dbz=ALLTRIM(thisform.edit3.Value)
INSERT INTO 全部归档文件.dbf(件号,责任者,文号,题名,日期,页数,归档年度,保管期限,全宗号,备注) VALUES (djh,dzrz,dwh,dtm,drq,dys,dgdnd,dbgqx,dbz)
this.Enabled=.f.


thisform.combo1.Enabled= .f.
thisform.combo2.Enabled= .f.
thisform.combo6.Enabled= .f.

thisform.command1.Enabled=.f.
thisform.command2.Enabled=.f.

thisform.commandgroup1.command1.Enabled=.t.
thisform.commandgroup1.command2.Enabled= .t.
thisform.commandgroup1.command3.Enabled= .t.
thisform.commandgroup1.command4.Enabled= .t.
thisform.commandgroup1.command5.Enabled= .f.
thisform.commandgroup1.command6.Enabled= .t.
thisform.commandgroup1.command7.Enabled= .t.

thisform.olecontrol2.visible= .f.


SELECT 机编顺序号,件号,责任者,文号,题名,日期,页数,归档年度,保管期限,全宗号,备注 FROM 全部归档文件.dbf into CURSOR sb ReadWrite

WITH thisform.grid1
.recordsource= "sb"
.Column1.width=60
.Column2.width=40
.Column3.width=100
.Column4.width=120
.Column5.width=750
.Column6.width=150
.Column7.width=100
.Column8.width=150
.Column9.width=100
.Column10.width=100
.Column11.width=100
endwith
thisform.commandgroup1.command14.Enabled= .F.
thisform.commandgroup1.command15.Enabled= .F.

thisform.text1.Controlsource="sb.件号"
thisform.text2.Controlsource="sb.全宗号"
thisform.text3.Controlsource="sb.责任者"
thisform.text4.Controlsource="sb.文号"
thisform.text5.Controlsource="sb.归档年度"
thisform.text11.Controlsource="sb.保管期限"
thisform.text12.Controlsource="sb.日期"
thisform.text13.Controlsource="sb.页数"
thisform.edit1.Controlsource="sb.题名"
thisform.edit3.Controlsource="sb.备注"
thisform.grid1.RecordSource="sb"
GO bottom
thisform.Refresh
...全文
58 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
发现代码 2012-03-28
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 的回复:]
INSERT INTO 全部归档文件.dbf(件号,责任者,文号,题名,日期,页数,归档年度,保管期限,全宗号,备注) VALUES (djh,dzrz,dwh,dtm,drq,dys,dgdnd,dbgqx,dbz)
前面10个字段,后面添加的值才9个,缺少"全宗号"的值。
[/Quote]


谢谢,我真够粗心的,急死我了,找了好一会都没找到原因...问题解决了,哈哈,谢谢.
lygcw9602 2012-03-28
  • 打赏
  • 举报
回复
INSERT INTO 全部归档文件.dbf(件号,责任者,文号,题名,日期,页数,归档年度,保管期限,全宗号,备注) VALUES (djh,dzrz,dwh,dtm,drq,dys,dgdnd,dbgqx,dbz)
前面10个字段,后面添加的值才9个,缺少"全宗号"的值。
改为:
INSERT INTO 全部归档文件.dbf(件号,责任者,文号,题名,日期,页数,归档年度,保管期限,全宗号,备注) VALUES (djh,dzrz,dwh,dtm,drq,dys,dgdnd,dbgqx,dqzh,dbz)
发现代码 2012-03-28
  • 打赏
  • 举报
回复
图片已上传到:
http://www.access911.net/csdn/filedescription.asp?mdb=2012-3-28&id=36&mode=3
http://www.access911.net/csdn/FileDescription.asp?mdb=2012-3-28&id=37&mode=3
lygcw9602 2012-03-28
  • 打赏
  • 举报
回复
INSERT INTO 全部归档文件.dbf(件号,责任者,文号,题名,日期,页数,归档年度,保管期限,全宗号,备注) VALUES (djh,dzrz,dwh,dtm,drq,dys,dgdnd,dbgqx,dbz)
前面10个字段,后面添加的值才9个,缺少"全宗号"的值。
发现代码 2012-03-28
  • 打赏
  • 举报
回复
怎么传图片呀????

2,722

社区成员

发帖
与我相关
我的任务
社区描述
VFP,是Microsoft公司推出的数据库开发软件,用它来开发数据库,既简单又方便。
社区管理员
  • VFP社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧