I'm try to return some values from a record in my access database but i can't
i use this code
but i receive Run-time error 2147.......
Please some help because i have stack......
PS i have also upload the DB. Has only 1 record.
Thanks and regards.......
i use this code
Code:
Private Sub Find_Desc_Quan()
Dim con As ADODB.Connection
Dim rst As ADODB.Recordset
Dim sSql As String
sSql = "SELECT * FROM Material WHERE ITEM_BARCODE= 1234567890"
Set con = Access.CurrentProject.Connection
Set rst = New ADODB.Recordset
rst.Open sSql, con, adOpenDynamic, adLockPessimistic
MsgBox rst(0)
rst.Close
Set rst = Nothing
con.Close
Set con = Nothing
End Sub
but i receive Run-time error 2147.......
Please some help because i have stack......
PS i have also upload the DB. Has only 1 record.
Thanks and regards.......
Attachments
Last edited by a moderator: