G
Guest
As far as pictures are concerned, thank you for all your help; I finally made
it. Paths to pictures on hard drive instead of storing them in the actual
data base;
but the problem is that for errors when NoPicture.bmp should appear I get
the following error meessage:
The expresiion OnFormat you entered as the event property setting produced
the following error: Microsoft Access can't open the file "NoPicture.bmp".
Following is the code I entered :
Function setImagePath()
Dim strImagePath As String
Dim strMDBPath As String
Dim intSlashLoc As String
On Error GoTo PictureNotAvailable
strMDBPath = CurrentProject.FullName
intSlashLoc = InStrRev(strMDBPath, "\", Len(strMDBPath))
strImagePath = Left(strMDBPath, intSlashLoc) & Me.txtImageName
Me.ImageFrame.Picture = strImagePath
Exit Function
PictureNotAvailable:
strImagePath = "NoPicture.bmp"
Me.ImageFrame.Picture = strImagePath
End Function
All pictures including NoPicutre.bmp are in the same folder. All of them
work but NoPicture.bmp
Thank you for you help in advance
it. Paths to pictures on hard drive instead of storing them in the actual
data base;
but the problem is that for errors when NoPicture.bmp should appear I get
the following error meessage:
The expresiion OnFormat you entered as the event property setting produced
the following error: Microsoft Access can't open the file "NoPicture.bmp".
Following is the code I entered :
Function setImagePath()
Dim strImagePath As String
Dim strMDBPath As String
Dim intSlashLoc As String
On Error GoTo PictureNotAvailable
strMDBPath = CurrentProject.FullName
intSlashLoc = InStrRev(strMDBPath, "\", Len(strMDBPath))
strImagePath = Left(strMDBPath, intSlashLoc) & Me.txtImageName
Me.ImageFrame.Picture = strImagePath
Exit Function
PictureNotAvailable:
strImagePath = "NoPicture.bmp"
Me.ImageFrame.Picture = strImagePath
End Function
All pictures including NoPicutre.bmp are in the same folder. All of them
work but NoPicture.bmp
Thank you for you help in advance