I have images I store as attachments in an access 2007 table named "Assets". The field that holds the attachments is called "Attachments". I have a form that is accessing a different table called Services. I have placed a button in this form for the purpose of brining up images that have been stored in the assets table that relate to the item being serviced. I would rather not have those images load unless specifically requested to do so.(maybe that is wrong of me, not sure) I tried:
"[BarCode] = [txtBarCode].Value")
Code:
imgAttachments.ControlSource = "Assets.Attachments"
imgAttachments.DefaultPicture = DLookup("[Attachments]", "Assets", "[BarCode] = [txtBarCode].Value")
I also tried it without the first line
Code:
imgAttachments.ControlSource = "Assets.Attachments"
either way I get an error saying it can not open the imagename.jpg file error 2220.
any suggestions would be appreciated.