出错的地方就这段程序,但我不觉得这里会有错.
If g_IfInCombox(Trim(Me.cmbDetail.Text), Me.cmbDetail) = 1 Then
strGoodsID = Left(Trim(Me.cmbDetail.Text), InStr(Trim(Me.cmbDetail.Text), "|") - 1)
strSQL = "select isnull(ER_fvarRowsName,''),isnull(ER_fvarRowsModel,''),isnull(ER_fvarUnit,'') from RowsInfo where ER_fvarRowsCode='" & strGoodsID & "'"
Set rstSQL = g_Conn.Execute(strSQL)
If Not rstSQL.EOF Then
For i = 0 To 2
Me.txtDetail(i + 2).Text = rstSQL.Fields(i)
Next
If Me.txtDetail(8).Enabled = True Then Me.txtDetail(8).SetFocus
End If
Else
MsgBox "该物料编号:" & Trim(Me.cmbDetail.Text) & "不存在,请检查!", vbCritical + vbOKOnly, "系统提示"
If Me.cmbDetail.Enabled = True Then Me.cmbDetail.SetFocus
End If