Hi,
I have an Access database that records images to an attachment field. There are other fields, but these are all text. An Excel macro interfaces between the user and the database. Images can be added to the record and they are retrieved for viewing.
The Access database is shared to multiple users through SharePoint. All users use the same exact workbook and macros to access the database.
Here's the issue: I am only able to view images if I am doing so from the same computer which added the image to the Access database.
If User A adds an image to a record, User A is able to load the image to the Excel userform. But, if User B, using their ownb machine, tries to view the same image from the same record, they get a "File not found" error in Excel.
The "missing data" problem occurs only with the attachment field. All other fields are referenced correctly at all times. Also, I know Access is updating the image field correctly in Access. If I manually open the database, I will see the image.
I eblieve the problem is at the Access level. For example, if I open the Access table and manually delete the images and then, from User B's computer, update the records with the same images, now User B will be able to see the images, but User A will get the "File not found problem'.
Maybe this has something to do with Access's cache for images?
Here's the code I use to load the attachment data to Excel:
Code:
Dim conn As Connection, rec As Recordset Dim DBPATH, PRVD, connString, query As String
Set conn = New Connection
Set rec = New Recordset
DBPATH = db_path.Value
PRVD = "Microsoft.ace.OLEDB.12.0;"
connString = "Provider=" & PRVD & "Data Source=" & DBPATH & "; Jet OLEDB:Database Password=" & p & ";"
conn.Open connString
query = "SELECT * FROM womhst WHERE wo_no = " & wo_no & ";"
rec.Open query, conn
iAtt.Picture = LoadPicture(rec.Fields(18))
rec.Close
conn.Close
I need this ASAP as I am presenting to my bosses tomorrow. I posted to Stack Overflow but have not received any responses, thus, I am also posting here. Here's the SO link: https://stackoverflow.com/questions/...-not-found-for