HTFC Forums

H.T.F.C.

How To Fix Computers





Go Back   HTFC Forums > Software Newsgroups > Microsoft Office

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1  
Old 07-22-2008, 11:56 AM
EllenM
 
Posts: n/a
Default Folder names from Access field

Hello,
I have an Access field that I'd like to be the names of folders. Is there
an easy way to do this? Or would it need to be done one by one?

Thanks,
Ellen
Reply With Quote
Sponsored Links
  #2  
Old 07-22-2008, 02:20 PM
DL
 
Posts: n/a
Default Re: Folder names from Access field

You really need to explain in more detail as to what 'names of folders'
means exactly, and in what context you are using this, eg Acess form or?
Then probably post to an Acess group, & give your version

"EllenM" <EllenM@discussions.microsoft.com> wrote in message
news:E5246FB5-A18D-4F4E-A4CA-610D3701664A@microsoft.com...
> Hello,
> I have an Access field that I'd like to be the names of folders. Is there
> an easy way to do this? Or would it need to be done one by one?
>
> Thanks,
> Ellen



Reply With Quote
  #3  
Old 07-22-2008, 03:38 PM
EllenM
 
Posts: n/a
Default Re: Folder names from Access field

Hi DL,
The names happen to be an Access, they could be in Excel. Just want a
folder for each entry in the field.

Ellen
Reply With Quote
  #4  
Old 07-24-2008, 01:27 AM
Beth Melton
 
Posts: n/a
Default Re: Folder names from Access field

"EllenM" <EllenM@discussions.microsoft.com> wrote in message
news:7C5238A3-2340-41A7-9479-B9E8CE3CFDA3@microsoft.com...
> Hi DL,
> The names happen to be an Access, they could be in Excel. Just want a
> folder for each entry in the field.


you can loop through each record in the table and create a folder using the
data value in the field. It'd be something like:

Sub MakeFolders()
Dim rs As ADODB.Recordset
Dim cn As ADODB.Connection
Dim strSql As String
Set rs = New ADODB.Recordset
strSql = "Select FolderNameField from Table"
rs.Open strSql, cn
Do Until rst.EOF
MkDir rs.Fields("FolderNameField")
rs.MoveNext
Loop
End Sub

If you're not sure what to do with the code or how to modify it to fit your
needs then you may want to ask in one of the Access programming (VBA)
newsgroups and perhaps someone there can help you out.

--
~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP
https://mvp.support.microsoft.com/profile/Melton
What is a Microsoft MVP? http://mvp.support.microsoft.com/gp/mvpfaqs

Guides for the Office 2007 Interface:
http://office.microsoft.com/en-us/tr...295841033.aspx


Reply With Quote
  #5  
Old 07-24-2008, 01:31 PM
EllenM
 
Posts: n/a
Default Re: Folder names from Access field

Thanks, Beth. I actually know someone that can help me with this script.
Thanks so much!!
Reply With Quote
  #6  
Old 07-26-2008, 04:55 AM
Beth Melton
 
Posts: n/a
Default Re: Folder names from Access field

"EllenM" <EllenM@discussions.microsoft.com> wrote in message
news:A36FE1DA-A7BC-42DC-83DC-6BE7955B5F54@microsoft.com...
> Thanks, Beth. I actually know someone that can help me with this script.
> Thanks so much!!


Good to hear! If you/they get stuck you can post back here too but in an
Access group you're more likely to find more folks who are familiar with VBA
and obtain a faster response. :-)
--
~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP
https://mvp.support.microsoft.com/profile/Melton
What is a Microsoft MVP? http://mvp.support.microsoft.com/gp/mvpfaqs

Guides for the Office 2007 Interface:
http://office.microsoft.com/en-us/tr...295841033.aspx


Reply With Quote
Sponsored Links
Fix your Windows Problems - FAST.
FREE Safe Scan Registry Check. Locate & Fix Errors in Minutes!
Reply


Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Folder names Pramit Windows XP 2 04-08-2008 10:50 PM
Printing only the NAMES of files in a folder Honest John Windows XP 12 03-24-2008 02:56 AM
Folder names disappeared. Charles W Davis Windows Vista 3 03-13-2008 02:49 AM
Strange Folder Names Pete Windows XP 1 08-13-2007 06:58 PM
Folder View, Folder Names, and IE Frames Shane Windows XP 2 07-20-2007 05:45 PM


All times are GMT. The time now is 06:47 PM.


Powered by vBulletin® Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© 2004 - 2007 Web-S-Sense Pty. Ltd. Usenet and forums posts © their respective authors.
Ad Management by RedTyger