Relative links

B

Barra

Hi, I have some background images linked to a form in Access 97, but I can't
find out how to link these images relative to the database. I've tried
...\images\image.jpg but no joy. Any help would be appreciated.
 
B

bob

In Access 2k or later use 'CurrentProject.Path' to get the path to the database file. Post back if you
need a solution for A97.
 
B

Barra

Thanks for the reply but I'm stuck with A97 so I would be grateful for a
solution for that version.
 
B

Brendan Reynolds

Public Function PathToCurrentDb() As String

PathToCurrentDb = Left$(CurrentDb.Name, Len(CurrentDb.Name) _
- Len(Dir(CurrentDb.Name)))

End Function
 
B

Barra

Many thanks!

Brendan Reynolds said:
Public Function PathToCurrentDb() As String

PathToCurrentDb = Left$(CurrentDb.Name, Len(CurrentDb.Name) _
- Len(Dir(CurrentDb.Name)))

End Function
 
Top