Hi there;
I have been able to link to pictures so that I can view them in Access using code I got from this website. It looks like this:
Public Function DisplayImageWeb(SDEADM_LND_LAND_PHOTO As Control, _
WEBSITE As Variant)
On Error GoTo Err_DisplayImage
Dim strDatabasePath As String
Dim intSlashLocation As Integer
With SDEADM_LND_LAND_PHOTO
If IsNull(WEBSITE) Then
ElseIf Left(WEBSITE, 4) = "http" Then
.Navigate (WEBSITE)
Else
If InStr(1, WEBSITE, "\") = 0 Then
' Path is relative
WEBSITE = CurrentProject.FullName
intSlashLocation = InStrRev(strDatabasePath, "\", Len(strDatabasePath))
strDatabasePath = Left(strDatabasePath, intSlashLocation)
strImagePath = strDatabasePath & strImagePath
End If
.Navigate (WEBSITE)
End If
End With
Exit_DisplayImage:
Exit Function
Err_DisplayImage:
Select Case Err.Number
Case Else
MsgBox Err.Number & " " & Err.Description
Resume Exit_DisplayImage:
End Select
End Function
This works great, but I am wondering if anyone knows how I can get the pictures to display to the extent of the web browser? Some of the pictures are so large I have to scroll and scroll to see the whole thing.....
Thanks!
piovesan
I have been able to link to pictures so that I can view them in Access using code I got from this website. It looks like this:
Public Function DisplayImageWeb(SDEADM_LND_LAND_PHOTO As Control, _
WEBSITE As Variant)
On Error GoTo Err_DisplayImage
Dim strDatabasePath As String
Dim intSlashLocation As Integer
With SDEADM_LND_LAND_PHOTO
If IsNull(WEBSITE) Then
ElseIf Left(WEBSITE, 4) = "http" Then
.Navigate (WEBSITE)
Else
If InStr(1, WEBSITE, "\") = 0 Then
' Path is relative
WEBSITE = CurrentProject.FullName
intSlashLocation = InStrRev(strDatabasePath, "\", Len(strDatabasePath))
strDatabasePath = Left(strDatabasePath, intSlashLocation)
strImagePath = strDatabasePath & strImagePath
End If
.Navigate (WEBSITE)
End If
End With
Exit_DisplayImage:
Exit Function
Err_DisplayImage:
Select Case Err.Number
Case Else
MsgBox Err.Number & " " & Err.Description
Resume Exit_DisplayImage:
End Select
End Function
This works great, but I am wondering if anyone knows how I can get the pictures to display to the extent of the web browser? Some of the pictures are so large I have to scroll and scroll to see the whole thing.....
Thanks!
piovesan