HTML Path Problem

_rob_

Registered User.
Local time
Today, 20:30
Joined
May 10, 2005
Messages
11
Trying to feed 2 browser components paths to some html docs

browser.Navigate (CurDir + "\dir\document.htm")
browser2.Navigate (CurDir + "\dir2\document2.htm")

it always looks for these in My Documents directory even if the database is placed somewhere else. why?

thanks for your help,
rob
 
You may have to use ChDir first to set the path to CurDir. Have you tried using a message box at the point that you want to use CurDir to see exactly what it is? Also, it looks like you have to specify the drive in CurDir to view the ChDir path if it is on a different drive.

From the Access Help File:
CurDir Function Example
This example uses the CurDir function to return the current path. On the Macintosh, drive specifications given to CurDir are ignored. The default drive name is “HD” and portions of the pathname are separated by colons instead of backslashes. Similarly, you would specify Macintosh folders instead of \Windows.

' Assume current path on C drive is "C:\WINDOWS\SYSTEM" (on Microsoft Windows).
' Assume current path on D drive is "D:\EXCEL".
' Assume C is the current drive.
Dim MyPath
MyPath = CurDir ' Returns "C:\WINDOWS\SYSTEM".
MyPath = CurDir("C") ' Returns "C:\WINDOWS\SYSTEM".
MyPath = CurDir("D") ' Returns "D:\EXCEL".

What does CurDir represent to you anyway? There may be a better way to go with this.
 
Last edited:
i just want it always to point to the same directory that the database is in. no matter what drive its in. surely theres an easy way of doing that? how would i go about creating a message box?

thanks for your help

rob
 

Users who are viewing this thread

Back
Top Bottom