Compile Error data member not found
Hello All,
Pls help i get this error : Compile error data member not found
Private Sub btnPostEntry_Click()
Dim db As Database, rs As Recordset, sqltxt As String
Set db = DBEngine(0)(0)
'sqltxt = "select * from STOCK_table where STOCK_table.[STORESCODE] = & Me![STORESCODE]"
'debug_added this code
sqltxt = "select * from STOCK_table where STOCK_table.[STORESCODE] = " & Me![STORESCODE] & ";"
'debug_added this code for debugging
MsgBox sqltxt
Set rs = db.OpenRecordset(sqltxt)
'Set rs = db.OpenRecordset(sqltxt, dbOpenDynaset)
If Not rs.EOF Then
'Advise operator how much inventory left if getting close to 0
If rs("ONHAND") = 0 Then
Beep
MsgBox "Your inventory is at zero"
End If
'commented this out
'rs.Edit
'rs("ONHAND") = rs("ONHAND") - Me![QUANTITY]
'rs.Update
End If
rs.Close
db.Close
Me!Button36.SetFocus
Me!btnPostEntry.Visible = False
End Sub
|