export problem

L

LGarcia

Hi all, I have a problem with exporting a file. This is the code I'm using:

DoCmd.TransferText acExportDelim, "Subjects Export Specification",
"tblSubjects", strDir & "Subjects.txt", True

where strDIR = C:\Projects\

I get a runtime error #3011 saying that the MS jet db engine can't find the
object 'Subjects#txt'

Anyone know where the # sign came from?

Using AccessXP.

Thanks,
LGarcia
 
N

Nikos Yannacopoulos

Long shot, but is the strDIR assignment strDIR = C:\Projects\ ? If that's
the case then you must enclose the path string in double quotes:
strDIR = "C:\Projects"
so Access treats it like a string.

HTH,
Nikos
 
L

LGarcia

Thanks for the reply! I'm actually using some code to return the actual path
name.
strDir = CurrentDb.TableDefs("tblSubjects").Connect
But I think my problem lies with the export specs. When I removed the specs:
DoCmd.TransferText acExportDelim, ,"tblSubjects", strDir & "Subjects.txt",
True
There were no errors.
Know of a good reference for creating a schema.ini file?
Thanks again!
 
P

Pieter Wijnen

not really but the specs & columns are to be found in the hidden tables
MSysIMEXSpecs &
MSysIMEXColumns
You can edit those...
HTH
Pieter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top