Create a folder

P

Paul

Hi, I have a database with a field which is an AutoNumber, this unique
number is then used as the Ref. Can I get Access to automatically
create a folder on my C Drive with this AutoNumber so that we can
store documents relating to this record.

Thanks
 
B

Brendan Reynolds

Paul said:
Hi, I have a database with a field which is an AutoNumber, this unique
number is then used as the Ref. Can I get Access to automatically
create a folder on my C Drive with this AutoNumber so that we can
store documents relating to this record.

Thanks

This line of code in the AfterInsert event procedure of a form bound to the
table would do it ...

Private Sub Form_AfterInsert()

MkDir "c:\" & Me.TestID

End Sub
 
P

Paul

This line of code in the AfterInsert event procedure of a form bound to the
table would do it ...

Private Sub Form_AfterInsert()

    MkDir "c:\" & Me.TestID

End Sub

Thanks, works great - what a time saver
 

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