Module for Access VBA read image from table

Will Access VBA read image from table, if so please sent me the module that will read a value directly from an Access table using VBA code?

Will Access VBA read image from table, if so please sent me the module that will read a value directly from an Access table using VBA code?
Hi Rosellas Phillips,
Please find the below code snippet that may help your problem. This reads table as a record set.
Sub Readdb()
Dim d As Database
Dim r As Recordset
Dim Price As Field, Qty As Field, UnitCost As Field
Set d = CurrentDB()
Set r = d.OpenRecordset("TableName")
Set Price = r.Fields("Price")
Set Qty = r.Fields("Qty")
Set UnitCost = r.Fields("UnitCost")
While Not r.EOF
r.Edit
Price = Qty * UnitCost
r.Update
r.MoveNext
Wend
r.Close
End Sub
Hope it helps
Hi,
Here's the code that you will need!
You will open a record, set object, find the record, and edit the field:
Code Snippet
Dim db As DAO.Database
Dim rst As DAO.Recordset
Dim strSQL As String
Set db=CurrentDB()
strSQL=""SELECT YourNumericField FROM YourTable WHERE … YourCondition=…. ""
set rst=db.OpenRecordset(strSQL, dbOpenDynaset)
With rst
If .RecorCount>0 Then
.MoveFirst
.Edit
!YourNumericField = Your value
.Update
End If
End With
Regards
Notifications