|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
哪里有错,提示方法和数据成员未找到
On Error GoTo 100
If TextMC1.Text = "" Then
MsgBox "请输入产品信息", 1 + 16, "系统提示"
TextBox1.SetFocus
Else
Dim RS1 As Recordset
Dim DB1 As Database
Set DB1 = OpenDatabase(ThisWorkbook.Path & "\" & "富光产品库.MDB")
Set RS1 = DB1.OpenRecordset(Name:="数据库", Type:=dbOpenDynaset)
RS1.FindFirst "产品名称='" & TextMC1.Value & "'" 方法和数据成员未找到
RS1.Edit
RS1.Fields("库存").Value = TextSL1.Value
RS1.Update
RS1.Close
Set RS1 = Nothing
Set DB1 = Nothing
End If
Exit Sub
100:
MsgBox "找不到符合条件的记录", 1 + 64, "系统提示"
|
|