Private Sub cmdInfo_Click()
Dim rsObj As New adodb.Recordset
Dim SqlStr As String
Dim szVSNO As String
Dim Remark As String
Dim sNow As String
Dim szEnterTime As String
Dim UsrID As String
Dim VsName As String
szVSNO = Replace(txtVSNO.Text, "'", "''")
SqlStr = "SELECT * FROM VisitorInfo WHERE VisitorNO ='" & szVSNO & "'"
Call rsObj.Open(SqlStr, DBCnn, adOpenKeyset, adLockReadOnly)
If rsObj.RecordCount 这句老说是3265错误
If bAlreadyExit Then
txtCost.Text = rsObj("Hours")
txtCost.Enabled = False
dtpExitTime.Enabled = False
Timer1.Enabled = False
dtpExitTime.Value = rsObj("ExitTime")
MsgBox "输入的ID号已经出场了,下面将显示它的详细信息", vbInformation
Else
txtCost.Text = CalculateTime(rsObj("EnterTime"), Now)
txtCost.Enabled = True
'如果计算成功, 那么可以提交车辆出场信息了
m_bIsReadyToSubmit = True
CmdRecord.Enabled = True
dtpExitTime.Enabled = True
Timer1.Enabled = True
End If
End Sub
自己怎么看都觉得代码没问题,就想不通了,哪儿的问题啊???
|