ID Picture

jmq

Registered User.
Local time
Today, 02:47
Joined
Oct 4, 2017
Messages
87
I want to add a picture for every employee.

How to do it?

Please see attached
 

Attachments

the most recommended method is to store the photos in a folder and store the path to the photo within the database and display it in an image control.
 
@moke123: Thanks! I already figure it out.
the solution i found was to open dialog box and store image location to the field.

the new problem now is how to restrict selection to images/pictures only
 
what method are you using to select the images? can you set the filter property for only image file types?
 
@moke123: this one..
Code:
Private Sub cmdSelectPhoto_Click()
    Dim ofD As FileDialog
    Dim file
    
    Set ofD = Application.FileDialog(msoFileDialogOpen)
    
    ofD.AllowMultiSelect = False
    ofD.Filters.Clear
    ofD.Filters.Add "Images", "*.gif; *.jpg; *.jpeg", 1
    
    If ofD.Show = False Then
        Exit Sub
    Else
        For Each file In ofD.SelectedItems
            loc = file
            MsgBox loc
        Next file
    End If
    
    imgPic.Picture = loc
End Sub
 

Users who are viewing this thread

Back
Top Bottom