Is VBA really the only way to ...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BurtonBach
    New Member
    • Oct 2006
    • 58

    Is VBA really the only way to ...

    I have a table in my database called 'mktblUpdteFrom Poll'

    Is VBA really the only way to make a command button that exports this to a CSV file? I have attempted to research this both here in the scripts and on the general web and have only found a couple VBA posts that I cannot seem to duplicate.

    I would greatly appreciate any words of advice!
  • ADezii
    Recognized Expert Expert
    • Apr 2006
    • 8834

    #2
    Originally posted by BurtonBach
    I have a table in my database called 'mktblUpdteFrom Poll'

    Is VBA really the only way to make a command button that exports this to a CSV file? I have attempted to research this both here in the scripts and on the general web and have only found a couple VBA posts that I cannot seem to duplicate.

    I would greatly appreciate any words of advice!
    You do not have to be bothered with either VBA or Command Buttons. If you like, you can do the Export manually in only a couple of minutes. Here are the steps:

    __1 Select the Table you wish to Export in the Database Window (mktblUpdteFrom Poll)
    __2 Select File, Export
    __3 Select Save as type to Text Files (*.txt;*.csv;*. tab;*.asc)
    __4 Enter a Filename
    __5 In the first Export Wizard Screen, select Delimited, view the Sample export format screen and make any necessary changes by clicking the Advanced... button
    __6 In the next screen, select Comma as the Delimiter.
    __7 In the next screen, provide an Absolute Path to your previously defined Filename.
    __8 Click Finish to Export to a *.csv Format.

    -----------------------------------------------------------------------------------------------------------------

    Option #2 is to create a Macro with only 2 Actions which will automate the process:

    Select Object
    ___Object Type - Table
    ___Object Name - Your Table Name (mktblUpdteFrom Poll)
    ___In Database Window - Yes

    Transfer Text
    ___Transfer Type - Export Delimited
    ___Specificatio n Name - <blank>
    ___Table Name - Your Table Name (mktblUpdteFrom Poll)
    ___File Name - Absolute Path to Comma Delimited File (.txt extension)
    ___Has Field Names - Yes
    ___HTML Table - <blank>
    ___Code Page - <blank>

    NOTE: As far as I know, there are no other Options without using VBA code.

    Comment

    • MSeda
      Recognized Expert New Member
      • Sep 2006
      • 159

      #3
      No you can use a macro to do this. create a macro and choose "Transfer Text"
      at the bottom choose export delimited and enter you table name and the destination including the name of the file and .txt.

      hope this helps,
      Megan

      Comment

      • BurtonBach
        New Member
        • Oct 2006
        • 58

        #4
        Thank you both. The macro worked, exactly what I needed to know!

        Comment

        Working...