Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub Form_Current()
'dim variables
Dim folderpath, ImageName
'find folder path
folderpath = CurrentProject.Path
'set image name with extension
ImageName = Me.txtImageName.Value
'capture new record error
If Me.NewRecord Then
Exit Sub
Else
'set picture to the image
If Dir(folderpath & "\" & ImageName) = ImageName Then
Me.Image6.Picture = folderpath & "\" & ImageName
Else
'set a nopicture image
Me.Image6.Picture = folderpath & "\" & "NoPicture.jpg"
End If
End If
End Sub
Well yes, if you don't mind each 50K picture taking up 500K in your database.BNPMike said:The easiest way is to create a field and store the photo in each record. If you create a form in the normal way, the picture control will give you the functionality to load the picture. It's a doddle.
I remember setting up something like this is a few minutes in a race against a Powerbuilder person. Needless to say, Access won the race.
What version of Access are you using? Are you talking about the Employee form? acXP that I use seems like just the way one would want to display pictures.JoeAtWork: The way it's done in the Northwind database is one of those "look how simple it is" examples that is completely impractical in a real application.