SaveAsText syntax

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeff Pritchard

    #1

    SaveAsText syntax

    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", "FileToSave To"

    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


  • Lyle Fairfield

    #2
    Re: SaveAsText syntax

    "Jeff Pritchard" <jeff.pritchard @asken.com.au> wrote in news:XpMnb.519
    $_z4.37859@news .optus.net.au:
    [color=blue]
    > 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", "FileToSave To"
    >
    > 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[/color]

    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(Obje ctType As AcObjectType, ObjectName As String, FileName As
    String)
    Member of Access.Applicat ion

    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)

    Comment

    • Jeff Pritchard

      #3
      Re: SaveAsText syntax

      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" <MissingAddress @Invalid.Com> wrote in message
      news:Xns942339B 959443FFDBA@130 .133.1.4...[color=blue]
      > "Jeff Pritchard" <jeff.pritchard @asken.com.au> wrote in news:XpMnb.519
      > $_z4.37859@news .optus.net.au:
      >[color=green]
      > > Anyone know where can I get the correct syntax for the SaveAsText[/color][/color]
      function.[color=blue][color=green]
      > > I found it once but can't now.
      > >
      > > The one commonly seen is not correct
      > >
      > > SaveAsText acForm, "FormName", "FileToSave To"
      > >
      > > 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[/color][/color]
      the[color=blue][color=green]
      > > intrinsic constants acForm, acReport etc don't work as they always[/color][/color]
      generate[color=blue][color=green]
      > > an error.
      > >
      > > Jeff[/color]
      >
      > Open any module. Click on the object browser in the standard tool bar.[/color]
      Right[color=blue]
      > 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(Obje ctType As AcObjectType, ObjectName As String, FileName[/color]
      As[color=blue]
      > String)
      > Member of Access.Applicat ion
      >
      > Double Click on AcObjectType. The values of the AcObjectType enumeration[/color]
      will[color=blue]
      > be shown.
      > AcForm is 2. All of your values are one too great.
      >
      > --
      > Lyle
      > (for e-mail refer to http://ffdba.com/contacts.htm)[/color]


      Comment

      • Lyle Fairfield

        #4
        Re: SaveAsText syntax

        "Jeff Pritchard" <jeff.pritchard @asken.com.au> wrote in
        news:F2Onb.520$ _z4.38155@news. optus.net.au:
        [color=blue]
        > 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[/color]

        After three beers all VBA procedures are beautiful.

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

        Comment

        Working...