紧急求助:加载文件出错,记录号 - 5。 form1<或它的一个成员>. 正
foxpro吧
全部回复
仅看楼主
level 1
问题:加载文件出错,记录号 - 5。 form1<或它的一个成员>. 正在加载窗体或数据环境:thisform只能在方法程序中使用。--------------------------------------我做的是一个小型酒店管理系统,其中打印报表的表单编译时会出现以上错误。该表单有“预览报表”、“打印报表”、“退出”三个功能按钮,使用的是VFP8.0,非常紧急,请大家帮忙,谢谢啊!我的QQ是:460128764 加我的时候注明“编程”就可以了,谢谢啊======================================“预览报表”的按钮控件的代码如下:IF thisform.optiongroup1.value =1&& 如果用户选择查询指定月报表DELETE VIEW viewmonth&& 删除原有的月度视图CREATE VIEW viewmonth as select customer.intime,customer.outtime,customer.room,;(customer.outtime-customer.intime) AS t,;(customer.outtime-customer.intime)*hroom.charge AS money;from ; hotel!hroom; inner join hotel!customer; on hroom.room = customer.room; where ( MONTH(customer.outtime)=thisform.spinner2.Value ; and YEAR(customer.outtime)=thisform.spinner1.Value; and customer.premoney <> (0) ) && 创建新的符合用户指定条件的月度视图REPORT FORM reppointmonth.frx preview nowait && 浏览基于新视图的报表ELSE&& 如果用户选择查询指定年报表DELETE VIEW viewyear&& 删除原有的年度视图CREATE VIEW viewyear as select customer.intime,customer.outtime,customer.room,;(customer.outtime-customer.intime) AS t,;(customer.outtime-customer.intime)*hroom.charge AS money;from ; hotel!hroom; inner join hotel!customer; on hroom.room = customer.room; where ( YEAR(customer.outtime)=thisform.spinner1.Value ; and customer.premoney <> (0) ) && 创建新的符合用户指定条件的年度视图REPORT FORM reppointyear.frx preview nowait && 浏览基于新视图的报表ENDIF ======================================“打印报表“的按钮控件的代码如下:IF thisform.optiongroup1.Value =1 && 如果用户选择查询指定月报表DELETE VIEW viewmonth && 删除原有的月度视图CREATE VIEW viewmonth as select customer.intime,customer.outtime,customer.room,;(customer.outtime-customer.intime) AS t,;(customer.outtime-customer.intime)*hroom.charge AS money;from ; hotel!hroom; inner join hotel!customer; on hroom.room = customer.room; where ( MONTH(customer.outtime)=thisform.spinner2.Value ; and YEAR(customer.outtime)=thisform.spinner1.Value; and customer.premoney<> (0)) && 创建新的符合用户指定条件的月度视图REPORT FORM reppointmonth.frx to printer prompt && 打印基于新视图的报表ELSE&& 如果用户选择查询指定年报表DELETE VIEW viewyear&& 删除原有的年度视图CREATE VIEW viewyear as select customer.intime,customer.outtime,customer.room,;(customer.outtime-customer.intime) AS t,;(customer.outtime-customer.intime)*hroom.charge AS money;from ; hotel!hroom; inner join hotel!customer; on hroom.room = customer.room; where ( YEAR(customer.outtime)=thisform.spinner1.Value ; and customer.premoney<> (0))&& 创建新的符合用户指定条件的年度视图REPORT FORM reppointyear.frx to printer prompt && 打印基于新视图的报表ENDIF======================================“退出”按钮控件的代码如下:release thisform======================================
2007年06月14日 13点06分 1
1