Steps:
Option Compare Database
Option Explicit
Private Sub Form_Current()
If Photo <> "" Then
Me.ImagePerson.Picture = Photo
End If
End Sub
- Create a table with Photo column with filepath of the pictures. The Photo column is TEXT datatype.
- Populate the table with pictures path.
- Create a form using this table.
- Insert an image control on the form in design view.
- Cancel the insert image instruction.
- Double click the form to open its property dialog box.
- In the Event tab of property sheet, double click the ellipsis for "on current" event.
- Paste the below code.
- Use the Picture property of the image control to pass the file path of the photo location.
- The following code in the Form event subroutine can do this :)
Option Compare Database
Option Explicit
Private Sub Form_Current()
If Photo <> "" Then
Me.ImagePerson.Picture = Photo
End If
End Sub
No comments:
Post a Comment