Form with linked path to logo

Vulcan1500

Registered User.
Local time
Today, 16:15
Joined
Nov 13, 2007
Messages
143
A form in my database has a logo. It is not embedded, but linked to the logo file, which is in the same directory as the database. As soon as I install the database on a different location it comes up with a message that it can not find the logo. Is it possible to add in the linked path a 'calculated' path, which is the current directory of the database.
 
For the current path of the database, you could use: CurrentProject.Path. Perhaps something like ...

Code:
Dim PathFile As String

PathFile = CurrentProject.Path & "\logo_name.jpg"

And then set the logo path to PathFile.

-dK
 
Thanks for your advice. When I double-click on the logo in my form the attached window opens and tried to add CurrentProject.Path & "\Logo.jpg" where now C:\Aalles Administratiesysteem\Logo.jpg is added, but it does not accept it.
 

Attachments

  • ScreenHunter_01 Feb. 07 10.07.gif
    ScreenHunter_01 Feb. 07 10.07.gif
    10.7 KB · Views: 120
You will have to set it through VBA. An example can be found here. You will need to go down and dissect the "Picture in a database" sample.

-dK
 
Looked at it and understand what is happening, but I do not understand how to get this 'calculated' path in the picture's property where now the linked path is stored.
 
It's in the VBA behind the form. Check the OnCurrent() event.

-dK
 

Users who are viewing this thread

Back
Top Bottom