Forum Discussion
Application.SaveAsText posible Bug
I'm discovering the powerful Application.SaveAsText and LoadFromText methods, never used before, and found that Application.SaveAsText acTable,... always produces an Error 2.487: The Object Type argument for the action or method is blank or invalid
The method works flawlessly with any other ObjectType.
I've tested this behavior in a bare new accdb, with a single table in it, in three different systems (win10 & win11), all yielding the same result.
My Access is 365 2508 (32 Bits)
May someone check if it is a bug?
You are always helpful. Thank you very much.
Before posting I made a web search about the method and only find information in https://learn.microsoft.com/en-us/office/client-developer/access/desktop-database-reference/application-save-as-text where they mention as param ObjectType, without excluding tables...
🙌
2 Replies
- JF_RuizBrass Contributor
You are always helpful. Thank you very much.
Before posting I made a web search about the method and only find information in https://learn.microsoft.com/en-us/office/client-developer/access/desktop-database-reference/application-save-as-text where they mention as param ObjectType, without excluding tables...
🙌 Hi,
It's not a bug but a known limitation. SaveAsText (and LoadFromText) cannot be used for tables. Instead you can use the TransferText method to export (and import) tables as text.
See e.g. Colin's description in point 1. (and 2.) here.
Servus
Karl
****************
Access Forever News DevCon
Access-Entwickler-Konferenz AEK