PC Review


Reply
Thread Tools Rate Thread

Access 2007 - Export Table to Text File w/ unrecognized extensions

 
 
Mike G - DC
Guest
Posts: n/a
 
      22nd Sep 2009
Folks – I need a little help trying to export tables to text files with
extensions that are not recognized by Access, .cmv & .cmo. I’ve tried,
without luck, to implement the registry update referenced within the Access
2000 support file listed below. I’m either not implementing the registry
update/macro correctly or the work around does not apply to Access 2007.

ACC2000: How to Import a Text File That Has an Extension That Access Does
Not Recognize
http://support.microsoft.com/?id=306144

I appreciate your ideas.
- mike

 
Reply With Quote
 
 
 
 
Ken Snell MVP
Guest
Posts: n/a
 
      22nd Sep 2009
Export to a .txt file, then use the Name statement in VBA code to change the
extension on the file.
--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/


"Mike G - DC" <(E-Mail Removed)> wrote in message
news:4FD99BF2-CE94-4947-9129-(E-Mail Removed)...
> Folks - I need a little help trying to export tables to text files with
> extensions that are not recognized by Access, .cmv & .cmo. I've tried,
> without luck, to implement the registry update referenced within the
> Access
> 2000 support file listed below. I'm either not implementing the registry
> update/macro correctly or the work around does not apply to Access 2007.
>
> ACC2000: How to Import a Text File That Has an Extension That Access Does
> Not Recognize
> http://support.microsoft.com/?id=306144
>
> I appreciate your ideas.
> - mike
>



 
Reply With Quote
 
Mike G - DC
Guest
Posts: n/a
 
      22nd Sep 2009
Thanks, that works. I'm new to VBA but was able to figure out how to create
the function and include the step within my export macro using the OpenModule
Action. This leads to another question though.

My initial TransferText action included an expression within the File Name
argument to append a date/time stamp. In using the Name Statement though, it
looks like input side of the statement must remain constant, something like
export.txt. Is there a way to append some additional VBA code to the output
side of name statement to include the system date/time?

Thanks again for the initial answer. Any additional help is greatly
appreciated.
- mike



"Ken Snell MVP" wrote:

> Export to a .txt file, then use the Name statement in VBA code to change the
> extension on the file.
> --
>
> Ken Snell
> <MS ACCESS MVP>
> http://www.accessmvp.com/KDSnell/
>
>
> "Mike G - DC" <(E-Mail Removed)> wrote in message
> news:4FD99BF2-CE94-4947-9129-(E-Mail Removed)...
> > Folks - I need a little help trying to export tables to text files with
> > extensions that are not recognized by Access, .cmv & .cmo. I've tried,
> > without luck, to implement the registry update referenced within the
> > Access
> > 2000 support file listed below. I'm either not implementing the registry
> > update/macro correctly or the work around does not apply to Access 2007.
> >
> > ACC2000: How to Import a Text File That Has an Extension That Access Does
> > Not Recognize
> > http://support.microsoft.com/?id=306144
> >
> > I appreciate your ideas.
> > - mike
> >

>
>
>

 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      22nd Sep 2009
There's no restriction that the input side remain constant.

Dim strOldName As String
Dim strNewName As String

strOldName = "C:\Folder\File" & Format(Date, "yyyymmdd") & ".abc"
strNewName = "C:\Folder2\File" & Format(Date, "yyyymmdd") & ".txt"
If Len(Dir(strOldName)) > 0 Then
Name strOldName As strNewName
End If

(the Len(Dir(strOldName)) check ensures that the file actually exists before
you try renaming it)

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Mike G - DC" <(E-Mail Removed)> wrote in message
news:F879BEB6-F5BE-41E9-9BCD-(E-Mail Removed)...
> Thanks, that works. I'm new to VBA but was able to figure out how to
> create
> the function and include the step within my export macro using the
> OpenModule
> Action. This leads to another question though.
>
> My initial TransferText action included an expression within the File Name
> argument to append a date/time stamp. In using the Name Statement though,
> it
> looks like input side of the statement must remain constant, something
> like
> export.txt. Is there a way to append some additional VBA code to the
> output
> side of name statement to include the system date/time?
>
> Thanks again for the initial answer. Any additional help is greatly
> appreciated.
> - mike
>
>
>
> "Ken Snell MVP" wrote:
>
>> Export to a .txt file, then use the Name statement in VBA code to change
>> the
>> extension on the file.
>> --
>>
>> Ken Snell
>> <MS ACCESS MVP>
>> http://www.accessmvp.com/KDSnell/
>>
>>
>> "Mike G - DC" <(E-Mail Removed)> wrote in message
>> news:4FD99BF2-CE94-4947-9129-(E-Mail Removed)...
>> > Folks - I need a little help trying to export tables to text files with
>> > extensions that are not recognized by Access, .cmv & .cmo. I've tried,
>> > without luck, to implement the registry update referenced within the
>> > Access
>> > 2000 support file listed below. I'm either not implementing the
>> > registry
>> > update/macro correctly or the work around does not apply to Access
>> > 2007.
>> >
>> > ACC2000: How to Import a Text File That Has an Extension That Access
>> > Does
>> > Not Recognize
>> > http://support.microsoft.com/?id=306144
>> >
>> > I appreciate your ideas.
>> > - mike
>> >

>>
>>
>>



 
Reply With Quote
 
Mike G - DC
Guest
Posts: n/a
 
      23rd Sep 2009
Excellent! Works perfectly. Thank you.

Also, for those who may reference this discussion down the road, I'm using
the "RunCode" action within my macro to run this public function rather than
the "OpenModule" action referenced within my second post.

Thanks again for the advice.
- mike

"Douglas J. Steele" wrote:

> There's no restriction that the input side remain constant.
>
> Dim strOldName As String
> Dim strNewName As String
>
> strOldName = "C:\Folder\File" & Format(Date, "yyyymmdd") & ".abc"
> strNewName = "C:\Folder2\File" & Format(Date, "yyyymmdd") & ".txt"
> If Len(Dir(strOldName)) > 0 Then
> Name strOldName As strNewName
> End If
>
> (the Len(Dir(strOldName)) check ensures that the file actually exists before
> you try renaming it)
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> "Mike G - DC" <(E-Mail Removed)> wrote in message
> news:F879BEB6-F5BE-41E9-9BCD-(E-Mail Removed)...
> > Thanks, that works. I'm new to VBA but was able to figure out how to
> > create
> > the function and include the step within my export macro using the
> > OpenModule
> > Action. This leads to another question though.
> >
> > My initial TransferText action included an expression within the File Name
> > argument to append a date/time stamp. In using the Name Statement though,
> > it
> > looks like input side of the statement must remain constant, something
> > like
> > export.txt. Is there a way to append some additional VBA code to the
> > output
> > side of name statement to include the system date/time?
> >
> > Thanks again for the initial answer. Any additional help is greatly
> > appreciated.
> > - mike
> >
> >
> >
> > "Ken Snell MVP" wrote:
> >
> >> Export to a .txt file, then use the Name statement in VBA code to change
> >> the
> >> extension on the file.
> >> --
> >>
> >> Ken Snell
> >> <MS ACCESS MVP>
> >> http://www.accessmvp.com/KDSnell/
> >>
> >>
> >> "Mike G - DC" <(E-Mail Removed)> wrote in message
> >> news:4FD99BF2-CE94-4947-9129-(E-Mail Removed)...
> >> > Folks - I need a little help trying to export tables to text files with
> >> > extensions that are not recognized by Access, .cmv & .cmo. I've tried,
> >> > without luck, to implement the registry update referenced within the
> >> > Access
> >> > 2000 support file listed below. I'm either not implementing the
> >> > registry
> >> > update/macro correctly or the work around does not apply to Access
> >> > 2007.
> >> >
> >> > ACC2000: How to Import a Text File That Has an Extension That Access
> >> > Does
> >> > Not Recognize
> >> > http://support.microsoft.com/?id=306144
> >> >
> >> > I appreciate your ideas.
> >> > - mike
> >> >
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Export from MS Access 2007 to Quickbooks IIF - How can I create a tabdelimited text file from Access 2007? Steve Microsoft Access Macros 2 11th Nov 2009 01:52 PM
Export Access 2007 report to Excel as a text file =?Utf-8?B?SGVhdGhlcg==?= Microsoft Access VBA Modules 1 1st Nov 2007 04:53 PM
how to export an access table to a plain text file? Martin Microsoft Access External Data 0 17th Sep 2004 03:01 PM
how to export an access table to a plain text file? =?Utf-8?B?V2VuZHk=?= Microsoft Access External Data 0 17th Sep 2004 02:43 PM
How to programmatically export an access table to a text file with delimeter Dominique Microsoft Access External Data 2 31st Oct 2003 03:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:51 PM.