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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking report background picture with relative address 1

Status
Not open for further replies.

ibgary

MIS
May 24, 2001
6
US
I have an access 2002 database with one report which has a background picture. If I embed the picture, the database takes up 59 Mb. If I link the picture the database is only 3.4 Mb and the picture is 384Kb. The picture is a gif file, and is a picture of a form. I keep the picture in the same folder as my mde file, and all works fine - if the user has the same directory structure as I do. Sometimes they do not.

I would like to use a relative address for the pointer to the linked picture. Does anyone know the proper syntax to use?

Thanks, for any help you can provide.
 
You can find the current directory of your MDE file with
Code:
Dim strFolder as String
Dim strImageFile as String
strFolder = currentproject.Path & "\"
strImageFile = strFolder & Me.txtImageFileName
'...

Duane
Hook'D on Access
MS Access MVP
 
Duane,
Your suggestion is elegant in it's simplicity, and works exceedingly well. Thanks again for your quick response.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top