Connecting Tech Pros Worldwide Help | Site Map

Use Windows API within Access to change a file name

Rick
Guest
 
Posts: n/a
#1: Nov 13 '05
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

Steve Jorgensen
Guest
 
Posts: n/a
#2: Nov 13 '05

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>
Rick
Guest
 
Posts: n/a
#3: Nov 13 '05

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?

Steve Jorgensen
Guest
 
Posts: n/a
#4: Nov 13 '05

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