You physically can't have a query called Query1.txt , Access won't allow you to have a period (.) in a query name.
How are you trying to run the export? From code or a macro presumably - can you show us that please?
DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
Please use the star below the post to say thanks if we have helped !
↓↓ It's down here ↓↓
The query isn't named Query1.txt, thats the name of the output file.
The query is called Query1
I do a right click>export>Text file
text exports MUST have a SPECIFICATION name to make sure the data is delimited, etc.
For network files, try to you full UNC drive names and not drive letters...some users wont have that drive letter: "\\server\folder\file.txt"
local drives do use letters:
docmd.TransferText acExportDelim ,"specName","query","c:\file.txt",true
I have a specification and the file is to be saved locally. And it still doesn't work
Please tell us how you are trying to do this - from the menu or via code? If it's code or macro please show the code.
DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
Please use the star below the post to say thanks if we have helped !
↓↓ It's down here ↓↓
From the menu
Okay - it appears to be query dependent, one query with parameters won't export without selecting the "Export data with formatting and layout" option.
Another does - but it doesn't have any parameters, maybe that's the issue ?
If your query has parameters try hard coding them and see if that fixes it.
I'm using 2016.
DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
Please use the star below the post to say thanks if we have helped !
↓↓ It's down here ↓↓
Perfect! I will try that!
I don't have any parameters