Group:  Microsoft Access ยป microsoft.public.access
Thread: Filenames and fields

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Filenames and fields
bilbo+ 27.09.2006 11:23:01
Hi there, i have just used this code to create a folder using a field name
Dim strPath As String

strPath = "\\Server\Database\CKS\Data\" & Me.JobNo
If Len(Dir(strPath, vbDirectory)) = 0 Then
MkDir (strPath)
End If
Shell "explorer.exe " & strPath, vbNormalFocus

However i want to create more folders in the directory but have been
unsuccessful in my attempts, for example, in the newly created folder i want
to also put a 'Services' fo9lder in there, but i am struggling to do it, any
help much appreciated, thanks WK
Re: Filenames and fields
"Pieter Wijnen" <it.isi.llegal.to.send.unsollicited.mail.wijnen.nospam.please[ at ]online.replace.with.norway> 27.09.2006 11:34:44
strPath = "\\Server\Database\CKS\Data\" & Me.JobNo
If Len(Dir(strPath, vbDirectory)) = 0 Then
MkDir (strPath)
MkDir (strPath & "\Services") ' should do it

End If
Shell "explorer.exe " & strPath, vbNormalFocus

--
Pieter Wijnen

My feeble Access pages (good links though)
http://www.thuleeng.com/access
When all else fail try:
http://www.mvps.org/access
http://www.granite.ab.ca/
http://allenbrowne.com/
http://www.lebans.com/


"bilbo+" <bilbo[ at ]discussions.microsoft.com> wrote in message
news:28BFB059-E02A-420B-85D5-15BDE76D59C6[ at ]microsoft.com...
[Quoted Text]
> Hi there, i have just used this code to create a folder using a field name
> Dim strPath As String
>
> strPath = "\\Server\Database\CKS\Data\" & Me.JobNo
> If Len(Dir(strPath, vbDirectory)) = 0 Then
> MkDir (strPath)
> End If
> Shell "explorer.exe " & strPath, vbNormalFocus
>
> However i want to create more folders in the directory but have been
> unsuccessful in my attempts, for example, in the newly created folder i
> want
> to also put a 'Services' fo9lder in there, but i am struggling to do it,
> any
> help much appreciated, thanks WK

--------------------------------------------------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 4868 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!


Re: Filenames and fields
"Douglas J. Steele" <NOSPAM_djsteele[ at ]NOSPAM_canada.com> 27.09.2006 12:54:11
Actually, the parentheses aren't required:

strPath = "\\Server\Database\CKS\Data\" & Me.JobNo
If Len(Dir(strPath, vbDirectory)) = 0 Then
MkDir strPath
MkDir strPath & "\Services"
End If
Shell "explorer.exe " & strPath, vbNormalFocus

Using parentheses would change the call from ByRef to ByVal. Granted, in
this case it doesn't really matter.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Pieter Wijnen"
<it.isi.llegal.to.send.unsollicited.mail.wijnen.nospam.please[ at ]online.replace.with.norway>
wrote in message news:%23N7BAji4GHA.2144[ at ]TK2MSFTNGP04.phx.gbl...
[Quoted Text]
> strPath = "\\Server\Database\CKS\Data\" & Me.JobNo
> If Len(Dir(strPath, vbDirectory)) = 0 Then
> MkDir (strPath)
> MkDir (strPath & "\Services") ' should do it
>
> End If
> Shell "explorer.exe " & strPath, vbNormalFocus
>
> --
> Pieter Wijnen
>
> My feeble Access pages (good links though)
> http://www.thuleeng.com/access
> When all else fail try:
> http://www.mvps.org/access
> http://www.granite.ab.ca/
> http://allenbrowne.com/
> http://www.lebans.com/
>
>
> "bilbo+" <bilbo[ at ]discussions.microsoft.com> wrote in message
> news:28BFB059-E02A-420B-85D5-15BDE76D59C6[ at ]microsoft.com...
>> Hi there, i have just used this code to create a folder using a field
>> name
>> Dim strPath As String
>>
>> strPath = "\\Server\Database\CKS\Data\" & Me.JobNo
>> If Len(Dir(strPath, vbDirectory)) = 0 Then
>> MkDir (strPath)
>> End If
>> Shell "explorer.exe " & strPath, vbNormalFocus
>>
>> However i want to create more folders in the directory but have been
>> unsuccessful in my attempts, for example, in the newly created folder i
>> want
>> to also put a 'Services' fo9lder in there, but i am struggling to do it,
>> any
>> help much appreciated, thanks WK
>
> --------------------------------------------------------------------------------
> I am using the free version of SPAMfighter for private users.
> It has removed 4868 spam emails to date.
> Paying users do not have this message in their emails.
> Try SPAMfighter for free now!
>
>


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net