You could look at the possibility of using environment variables as Douglas
suggested in his first reply.
To see what environment variables are available on your system open a
command prompt and type
set <enter>
Here are some from my system -
COMPUTERNAME=TREES
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\Len
SystemDrive=C:
USERPROFILE=C:\Documents and Settings\Len
WINDIR=C:\WINDOWS
You could look at using a combination of Homedrive and Homepath or
Userprofile or some other existing variable. Also, you can create
and use your own custom variables like the ones you are used to from
your scripting language. eg you could create Dsktop=C:\Doc....\Desktop
and use it in Douglas' code.
strFile = Environ("Dsktop") & "\Data.txt"
DoCmd.TransferText acExportDelim, , "MyTable", strFile, True
--
Len
______________________________________________________
remove nothing for valid email address.
| On Wed, 19 Aug 2009 07:42:13 -0400, "Douglas J. Steele"
|
| >| >>
| >> I just needed to know how Access deals with relative paths and what
| >> its _own_ variable for the desktop would be. I'm hoping that Access
| >> has something similar to use in a script to save an export of the
| >> data.
| >>
| >> So pls, just need that point clarified - does Access handle saving to
| >> a existing relative path variable of its own for the desktop and what
| >> is that variable?
| >
| >Access does not have its own variables to represent the paths to
"special
| >folders".
| >
| >You can use API calls to get them, though: see
| >
http://www.mvps.org/access/api/api0054.htm at "The Access Web" for a
| >complete sample.
|
| <sigh> Darn. Okay. Well, looks like I'll keep the status quo then,
| for now.
|
| Thanks.
D
|