Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Autocreate folders on new record entry.

Status
Not open for further replies.

slames

Technical User
Nov 5, 2002
211
GB
Is it possible to autocreate a folder and subfolders after update of certain criteria, using variables from a form to name the folders? If so can anyone give me some pointers please.
Thanks
Steph
 
use mkdir

chdir to the correct starting point, and then MkDir Forms!MyFrm.var.value

Hopr this helps

:p
 
If you use MkDir and the directory is already there, then you get a File Accesss error (error 75, if I remember correctly).

Use the technique below to prevent an error occurring.

On Error Resume Next
ChDir DataDir
If Err = 76 Then MkDir MyNewDir
Err = 0

Paul
 
Thanks everyone, have got this working now. Cheers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top