Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Imaging Seminar    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Access Imagining
David McMahon 

10 years ago
G'day Rick, thanks for the seminar on Access Imaging. I have a question regarding image paths for forms and reports. The VBA code you show for image paths in Item 22.: Image Report seems to me for Absolute paths. I have created some code to create a relative path which lets me use the Access mbd on different computers.

My code works fine to allow image display with forms, but I cannot make it work for Reports.

Here is my VBA code:
Public Function GetImagePath() As String
    GetImagePath = GetDBPath & "images\"
End Function

Public Function GetDBPath() As String
    GetDBPath = CurrentProject.Path & "\"
End Function

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

End Sub

Private Sub Report_Current()
    Dim HieroImagePath As String
       HieroImagePath = GetImagePath & Me!image_file_name
        If Len([image_file_name]) > 0 And Len(Dir(HieroImagePath)) > 0 Then
        headword_image.Picture = HieroImagePath
        Else
            headword_image.Picture = ""
        End If
End Sub

Private Sub Report_Load()

End Sub

Private Sub headword_image_Click()

End Sub

Private Sub image_file_name_Click()

End Sub




Reply from Alex Hedley:

Some suggestions on other forums I've found say to create a hidden field on the Form, set the value to be the path then set the Picture object to be that

Me![PictureImage].Properties("Picture") = Me![ImagePath]

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Imaging Seminar.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/2/2026 6:50:12 AM. PLT: 0s