错误一:
清空语句太繁琐?
我想到的除了在模块处写上通用语句调用外,还有一个方法可以很轻松的实现清空。
Dim ctrl As Control
For Each ctrl In Me.Controls
If TypeOf ctrl Is TextBox Then
ctrl.Text = ""
End If
Next
错误二
结账错误?
这个错误出现是因为我没有用操作员13注册,注册完之后购卡、充值什么的就出现了。
还有一个是结账完之后没有把所有卡都结账,每次只结账一个。
'更新学生表
txtSQL = "select * from student_Info where UserID='" &
Trim(comboOpUserID.Text) & "'and Ischeck = '" & "未结账" & "'"
Set mrcS = ExecuteSQL(txtSQL, MsgText)
Do While Not mrcS.EOF
mrcS!Ischeck = "已结账"
mrcS.Update
mrcS.MoveNext
Loop
错误三
账单错误?
这个错误是和结账关联的,因为没有结账所以账单不显示信息。
Set Report = New grproLibCtl.GridppReport
Report.LoadFromFile (App.Path & "\daycheck.grf") '加载模版
Report.DetailGrid.Recordset.ConnectionString="Provider=SQLOLEDB.1;
Password=123456;Persist Security Info=True;User ID=sa;Initial Catalog=charge_sys;Data Source=DESKTOP-PG795RI;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=DESKTOP-PG795RI;Use Encryption for Data=False;Tag with column collation when possible=False" '数据库连接数据源
txtSQL = "select * from CheckDay_Info where date='" & Format(Date, "yyyy-mm-dd") & "'order by date desc"
Report.DetailGrid.Recordset.QuerySQL = txtSQL
'Report.ParameterByName("date1").Value = Format(Date, "yyyy-mm-dd")
'Report.ParameterByName("time1").Value = Format(Time, "hh:mm:mm")
'Report.ParameterByName("a1").Value = UserName
'显示报表中的内容
GRDisplayViewer1.Report = Report
GRDisplayViewer1.Start
以上是我的总结,欢迎大家提出意见!