Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Re-size a picture in a form

Status
Not open for further replies.

piovesan

Technical User
Jan 23, 2002
159
CA
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top