This is an Access 97 question.
I have a simple piece of code that adds a new folder and some sub folders within the main folder called: SENB. A textbox called txtUser will be added to the SENB folder. However if that folder already exists then the process should abort. I do not know how to read the SENB folder to see if a folder matching txtUser exists. Please help.
Here is what I have:
Private Sub cboUser_Click()
If MsgBox("You are about to create a new user account called '" & Me!txtUser & "'. Are you sure?", vbInformation + vbYesNo) = vbNo Then
MsgBox "Process aborted by user.", vbInformation
'I need code here to loop through SENB directory to see if directory exists with same name as txtUser. If it does warn user and exit sub.
MkDir ("C:\SENB\USERS\" & Me!txtUser) ' Make new directory or folder.
MkDir ("C:\SENB\USERS\" & Me!txtUser & "\proc")
MkDir ("C:\SENB\USERS\" & Me!txtUser & "\unproc")
MkDir ("C:\SENB\USERS\" & Me!txtUser & "\added")