กระทู้เก่าบอร์ด อ.Yeadram
681 0
URL.หัวข้อ /
URL
ช่วยดู Code ให้ที ค่ะว่าผิดตรงไหน
Private Sub Command40_Click()
Dim SQLEquip As String
Dim dbInfo As DAO.Database
Dim recordSetEquip As DAO.Recordset
Set dbInfo = CurrentDb
SQLEquip = "SELECT * FROM EquipmentDetail WHERE ListEquipment='" & Me.ListEquipmentEED & "'"
Set recordSetEquip = dbInfo.OpenRecordset(SQLEquip)
If Not recordSetEquip.EOF Then
Me.UnitName = recordSetEquip![UnitName]
Me.TypeEquipment = recordSetEquip![TypeEquipment]
Me.ListEquipment = recordSetEquip![ListEquipment]
Me.Case = recordSetEquip![Case]
Me.Amount = recordSetEquip![Amount]
Me.ListYear = recordSetEquip![ListYear]
Me.Price = recordSetEquip![Price]
Me.Note = recordSetEquip![Note]
Else
MsgBox ("Not Found Data")
End If
recordSetEquip.Close
End Sub
ตรงที่ตัวหนาค่ะ ที่มันแจ้งบัค
Dim SQLEquip As String
Dim dbInfo As DAO.Database
Dim recordSetEquip As DAO.Recordset
Set dbInfo = CurrentDb
SQLEquip = "SELECT * FROM EquipmentDetail WHERE ListEquipment='" & Me.ListEquipmentEED & "'"
Set recordSetEquip = dbInfo.OpenRecordset(SQLEquip)
If Not recordSetEquip.EOF Then
Me.UnitName = recordSetEquip![UnitName]
Me.TypeEquipment = recordSetEquip![TypeEquipment]
Me.ListEquipment = recordSetEquip![ListEquipment]
Me.Case = recordSetEquip![Case]
Me.Amount = recordSetEquip![Amount]
Me.ListYear = recordSetEquip![ListYear]
Me.Price = recordSetEquip![Price]
Me.Note = recordSetEquip![Note]
Else
MsgBox ("Not Found Data")
End If
recordSetEquip.Close
End Sub
ตรงที่ตัวหนาค่ะ ที่มันแจ้งบัค
Time: 0.1147s