benkingery
Registered User.
- Local time
- Yesterday, 23:30
- Joined
- Jul 15, 2008
- Messages
- 153
I have a query drawing its data from two tables. The two tables are related through Item number. One table contains item data, the other contains transactions for individual items on the item table. Here is the SQL:
Ultimately, I need to export this query using this code"
The export specs "CSNInventory" spell out that this needs to be exported as a Pipe ("|") delimited file with no text qualifiers.
I am receiving one of two messages. either 1) "Permission Denied" or 2) "Run-time error '3011': The Microsoft Jet database engine could not fin the object '2009_1007163622_CSN_Inventory.txt'. Make sure th eobject exists and that you spell its name and the path name correctly".
When I run the export, the file is actually created and placed in the specified directory, however no data is placed on the exported file. Also, the exported file remains locked until I close the entire access database.
Has anyone ever seen this type of problem? I have 5 other queries that have very similar logic and none of them have the same problem.
Thanks in advance for any help.
Code:
SELECT "3253" AS 3253, CS_Transactions.Item, Sum([CS_Transactions.QTY]*IIf([Type]='Credit',1,-1)) AS CS_CurrentOnhand, "0" AS [QTY Backordered], "0" AS [QTY On Order], Null AS [Next Available Date], IIf([Master_Child].[CS_Active]=Yes,"0","1") AS Discontinued, Master_Child.CS_ProductName
FROM Master_Child INNER JOIN CS_Transactions ON Master_Child.CS_Child = CS_Transactions.Item
GROUP BY "3253", CS_Transactions.Item, "0", "0", Null, IIf([Master_Child].[CS_Active]=Yes,"0","1"), Master_Child.CS_ProductName;
Ultimately, I need to export this query using this code"
Code:
DoCmd.TransferText acExportDelim, "CSNInventory", "CS_CurrentOnhand", "Y:\Rochelle\Inventory Uploads\CSN Stores\" & Format(Now(), "YYYY_MMDDHHMMSS") & "_CSN_Inventory.txt"
The export specs "CSNInventory" spell out that this needs to be exported as a Pipe ("|") delimited file with no text qualifiers.
I am receiving one of two messages. either 1) "Permission Denied" or 2) "Run-time error '3011': The Microsoft Jet database engine could not fin the object '2009_1007163622_CSN_Inventory.txt'. Make sure th eobject exists and that you spell its name and the path name correctly".
When I run the export, the file is actually created and placed in the specified directory, however no data is placed on the exported file. Also, the exported file remains locked until I close the entire access database.
Has anyone ever seen this type of problem? I have 5 other queries that have very similar logic and none of them have the same problem.
Thanks in advance for any help.