Is there a way to get ms-access to display images from external files

前端 未结 6 1338
予麋鹿
予麋鹿 2020-12-06 19:09

I\'ve got an MS-Access app (1/10th MS-Acccess, 9/10ths MS-SQL) that needs to display photographs of some assets along with their specifications. Currently the images are sto

6条回答
  •  囚心锁ツ
    2020-12-06 19:32

    Another option is to put an image control on your form. There is a property of that control (Picture) that is simply the path to the image. Here is a short example in VBA of how you might use it.

    txtPhoto would be a text box bound to the database field with the path to the image imgPicture is the image control The example is a click event for a button that would advance to the next record.

    Private Sub cmdNextClick()
        DoCmd.GoToRecord , , acNext
        txtPhoto.SetFocus
        imgPicture.Picture = txtPhoto.Text
        Exit Sub
    End Sub
    

提交回复
热议问题