Create a folder

  • Thread starter Thread starter Paul
  • Start date Start date
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
 
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
 
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
 
Back
Top