A macro to create a folder when a record is saved

B

Blakey300

Hi all

I am not quite sure if I can do this, or where to start.

I am using Access 2007

I am designing a DB, which will have a products section, and what i want to
do is the following:

When I save a new record I want a macro or code that will create a new
folder for that product. ie a new product is created with a [ProductID] of 1,
when I save this record, I want a folder created on my hard drive
(C:\.....\MyDocuments\ProductDocs\[productID). My products table currently
has an attachement field anyway.

I would ultimatly like to have a button on my form that will open a browse
screen then transfer the selected document to the relevant folder. I used to
be able to do this on a foxpro DB but as it was a purchased product I
couldn't see the design as to how they did it.

The documents will be of various different formats and sizes.

I hope this makes sense, if not let me know.

Regards

Dave
 
S

Steve Schapel

Dave,

There is no provision to do file and folder manipulations in macros. You
will need a VBA procedure for this. You can use the MkDir method in VBA.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top