By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,846 Members | 1,680 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,846 IT Pros & Developers. It's quick & easy.

SaveAsText syntax

P: n/a
Anyone know where can I get the correct syntax for the SaveAsText function.
I found it once but can't now.

The one commonly seen is not correct

SaveAsText acForm, "FormName", "FileToSaveTo"

The last two args are fine but the acForm is wrong. I thought it was a
number from 2 to 6
Query 2
Form 3
Report 4
Script 5
Module 6

But the problem I posted earlier is throwing some doubt on this. I know the
intrinsic constants acForm, acReport etc don't work as they always generate
an error.

Jeff
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Jeff Pritchard" <je************@asken.com.au> wrote in news:XpMnb.519
$_********@news.optus.net.au:
Anyone know where can I get the correct syntax for the SaveAsText function.
I found it once but can't now.

The one commonly seen is not correct

SaveAsText acForm, "FormName", "FileToSaveTo"

The last two args are fine but the acForm is wrong. I thought it was a
number from 2 to 6
Query 2
Form 3
Report 4
Script 5
Module 6

But the problem I posted earlier is throwing some doubt on this. I know the
intrinsic constants acForm, acReport etc don't work as they always generate
an error.

Jeff


Open any module. Click on the object browser in the standard tool bar. Right
click in the dialog whcih is opened. Select "Show Hidden Members". Click
(Turn on). In the search box type "SaveAsText"

In AccessXP I am rewarded with:

Sub SaveAsText(ObjectType As AcObjectType, ObjectName As String, FileName As
String)
Member of Access.Application

Double Click on AcObjectType. The values of the AcObjectType enumeration will
be shown.
AcForm is 2. All of your values are one too great.

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #2

P: n/a
Thanks Lyle. Not sure what happened here but after leaving the computer,
having some dinner and reading your post it was obvious. Can't see the trees
for the forest.

Jeff

"Lyle Fairfield" <Mi************@Invalid.Com> wrote in message
news:Xn*******************@130.133.1.4...
"Jeff Pritchard" <je************@asken.com.au> wrote in news:XpMnb.519
$_********@news.optus.net.au:
Anyone know where can I get the correct syntax for the SaveAsText function. I found it once but can't now.

The one commonly seen is not correct

SaveAsText acForm, "FormName", "FileToSaveTo"

The last two args are fine but the acForm is wrong. I thought it was a
number from 2 to 6
Query 2
Form 3
Report 4
Script 5
Module 6

But the problem I posted earlier is throwing some doubt on this. I know the intrinsic constants acForm, acReport etc don't work as they always generate an error.

Jeff
Open any module. Click on the object browser in the standard tool bar.

Right click in the dialog whcih is opened. Select "Show Hidden Members". Click
(Turn on). In the search box type "SaveAsText"

In AccessXP I am rewarded with:

Sub SaveAsText(ObjectType As AcObjectType, ObjectName As String, FileName As String)
Member of Access.Application

Double Click on AcObjectType. The values of the AcObjectType enumeration will be shown.
AcForm is 2. All of your values are one too great.

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)

Nov 12 '05 #3

P: n/a
"Jeff Pritchard" <je************@asken.com.au> wrote in
news:F2*****************@news.optus.net.au:
Thanks Lyle. Not sure what happened here but after leaving the
computer, having some dinner and reading your post it was obvious. Can't
see the trees for the forest.

Jeff


After three beers all VBA procedures are beautiful.

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.