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()
[COLOR=green] 'dim variables[/color]
Dim folderpath, fullpath, ImageName
[COLOR=green] 'find application full path[/color]
fullpath = CurrentProject.FullName
[COLOR=green]'find folder path[/color]
folderpath = Left(fullpath, InStrRev(fullpath, "\") - 1)
[COLOR=green] 'set image name with extension[/color]
ImageName = Me.txtImageName.Value
[COLOR=green]'capture new record error[/color]
If Me.NewRecord Then
Exit Sub
Else
[COLOR=green] 'set picture to the image[/color]
Me.Image6.Picture = folderpath & "\" & ImageName
End If
End Sub
Private Sub Form_Current()
[COLOR=green] 'dim variables[/color]
Dim folderpath, ImageName
[COLOR=green] 'find folder path[/color]
folderpath = CurrentProject.Path
[COLOR=green]'set image name with extension[/color]
ImageName = Me.txtImageName.Value
[COLOR=green]
'capture new record error
[/color] If Me.NewRecord Then
Exit Sub
Else
[COLOR=green] 'set picture to the image[/color]
If Dir(folderpath & "\" & ImageName) = ImageName Then
Me.Image6.Picture = folderpath & "\" & ImageName
Else
[COLOR=green]'set a nopicture image[/color]
Me.Image6.Picture = folderpath & "\" & "NoPicture.jpg"
End If
End If
End Sub
Private Sub Form_Current()
ImageName = Me.txtImageName.Value
ImageName = Me.ID.Value