Connecting Tech Pros Worldwide Help | Site Map

Use Windows API within Access to change a file name

  #1  
Old November 13th, 2005, 09:29 AM
Rick
Guest
 
Posts: n/a
Does anyone have a bit of sample code to use with Access 2000 in order
to use the Windows API to change an external file name or file name
extension? For example, if I export a query to a text file
(MyQueryData.txt) and want to change it to (MyQueryData03272005.duh).

Thanks

  #2  
Old November 13th, 2005, 09:29 AM
Steve Jorgensen
Guest
 
Posts: n/a

re: Use Windows API within Access to change a file name


On 27 Mar 2005 14:00:04 -0800, "Rick" <richard.overturf@att.net> wrote:
[color=blue]
>Does anyone have a bit of sample code to use with Access 2000 in order
>to use the Windows API to change an external file name or file name
>extension? For example, if I export a query to a text file
>(MyQueryData.txt) and want to change it to (MyQueryData03272005.duh).
>
>Thanks[/color]

You can use the API if you want, and you might want to - but you don't have
to. You can also use the Name statement in VBA. You have to hunt deeply to
find it in the help which is why many of us don't know it exists.

Name <oldpathname> As <newpathname>
  #3  
Old November 13th, 2005, 09:30 AM
Rick
Guest
 
Posts: n/a

re: Use Windows API within Access to change a file name


Thanks Steve. That's all there is to it? Just one line of code?

  #4  
Old November 13th, 2005, 09:30 AM
Steve Jorgensen
Guest
 
Posts: n/a

re: Use Windows API within Access to change a file name


On 28 Mar 2005 07:12:23 -0800, "Rick" <richard.overturf@att.net> wrote:
[color=blue]
>Thanks Steve. That's all there is to it? Just one line of code?[/color]

Yup.
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 14th, 2005 08:57 PM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 14th, 2005 07:46 PM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 0 November 14th, 2005 03:55 PM
comp.lang.c Answers to Frequently Asked Questions (FAQ List) Steve Summit answers 5 November 14th, 2005 12:36 PM