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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check folder exists if not create 2

Status
Not open for further replies.

Ronnieatwarton

Technical User
Oct 24, 2002
5
GB
I need to save tables to a database and save them in a specific folder.
When a save button is pressed I want to check to see if it already exisits, if it does i want to save the database but not overwrite any others (date stamp added?)
If the folder does not exist, then I would like to ask the user where he would like to place it, but not give the option to name it.
any ideas?
 
I need to save tables to a database and save them in a specific folder"

What?
Tables are a part of an mdb file; they can't be saved independently of the mdb file which contains them.
 
Don't forget the good ole BASIC commands:
[tt]
If Dir("C:\MyFolder", vbDirectory) = "" Then
If MsgBox("Folder does not exist, create it?", _
vbQuestion + vbOKCancel, "Alert:") = vbOK Then
MKDIR "C:\MyFolder"
End If
End If
[/tt]

VBSlammer
redinvader3walking.gif

"You just have to know which screws to turn." - Professor Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top