Connecting Tech Pros Worldwide Help | Site Map

Building a form to copy and rename files

Paddy
Guest
 
Posts: n/a
#1: May 16 '06
Dear forum,

I am currently building my first Access (XP) database from scratch, and
I would like to be able to enable users of this database to enter a
filename in an Access form so that, once the filename has been
specified, the (.dbf) file is copied and given a new name. Can anybody
help me with this?

(I then hope to use some borrowed code to link to the file from the
database and append the data it contains to a table in my database, but
that will have to wait until I've managed the first step, since I can't
link to the .dbf file unless the name is in the correct format - no
more than eight characters long, including spaces. )

salad
Guest
 
Posts: n/a
#2: May 16 '06

re: Building a form to copy and rename files


Paddy wrote:
[color=blue]
> Dear forum,
>
> I am currently building my first Access (XP) database from scratch, and
> I would like to be able to enable users of this database to enter a
> filename in an Access form so that, once the filename has been
> specified, the (.dbf) file is copied and given a new name. Can anybody
> help me with this?[/color]

Look at DIR and NAME in help. Look at the examples in the help file for
each topic.

You might want to go to http://www.mvps.org/access/api/api0001.htm for a
FileOpen/Save dialog solution to get your filenames.
[color=blue]
> (I then hope to use some borrowed code to link to the file from the
> database and append the data it contains to a table in my database, but
> that will have to wait until I've managed the first step, since I can't
> link to the .dbf file unless the name is in the correct format - no
> more than eight characters long, including spaces. )
>[/color]
Tom van Stiphout
Guest
 
Posts: n/a
#3: May 17 '06

re: Building a form to copy and rename files


On Tue, 16 May 2006 15:52:36 GMT, salad <oil@vinegar.com> wrote:

Also look at the FileCopy function to actually copy the file.
-Tom.

[color=blue]
>Paddy wrote:
>[color=green]
>> Dear forum,
>>
>> I am currently building my first Access (XP) database from scratch, and
>> I would like to be able to enable users of this database to enter a
>> filename in an Access form so that, once the filename has been
>> specified, the (.dbf) file is copied and given a new name. Can anybody
>> help me with this?[/color]
>
>Look at DIR and NAME in help. Look at the examples in the help file for
>each topic.
>
>You might want to go to http://www.mvps.org/access/api/api0001.htm for a
>FileOpen/Save dialog solution to get your filenames.
>[color=green]
>> (I then hope to use some borrowed code to link to the file from the
>> database and append the data it contains to a table in my database, but
>> that will have to wait until I've managed the first step, since I can't
>> link to the .dbf file unless the name is in the correct format - no
>> more than eight characters long, including spaces. )
>>[/color][/color]

Paddy
Guest
 
Posts: n/a
#4: May 17 '06

re: Building a form to copy and rename files


Thank you both! I'll give that a try right away.

Paddy

Closed Thread