
Flexible or relative path for import
You don't say what version of ms-access you are using.
If you are using a2002(xp), then there is a file dialog you can use to open
and browse to a file name.
For other versions of ms-access, a very low code solution is to use the
common dialogs control.
The other popular method is to use a call to the windows API. There is a
example that everyone uses at:
http://www.mvps.org/access/api/api0001.htm
For making things relative. you can grab the path name as follows
strDir = currentdb.name
The above is the full path name. So, we need to strip off the yourapp.mdb
(name of the mdb, and the result will be our path). Hence
strDir = left(strdir),len(strdir) - len(dir(strdir)))
At this point, strDir will be the full pathname to your current dir, and
thus you can now work relative to the dir.
--
Albert D. Kallal
Edmonton, Alberta Canada
www.attcanada.net/~kallal.msn