Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > Courses > Access > Developer > D31 > < D30 | D32 >
Back to Access Developer 31    Comments List
Upload Images   Link   Email  
Commas in Folder and File Names
JoAnn Brookover 
   
3 years ago
I just finished part one of Developer 31. The Pickfile works fine. The Dir function also works fine unless there is a comma in a folder or file name. I have googled till I can't see straight and the only solution I have seen (that actually works) is renaming everything. Is there a class that addresses this issue? Or am I just stuck with renaming?
Alex Hedley 
            
3 years ago
Why is there a comma in the path?

Are you putting quotes around the file path?
JoAnn Brookover OP 
   
3 years ago
I am the volunteer clerk for a cemetery. All the folders and files I inherited are named "Doe, John" or "Smith, Jane - Obituary". The 70-80 year old guys that devised this file system aren't really computer literate, and commas work fine in file explorer, so... it is what it is LOL.

There are quotes around the file path (CurrentPath & "*.*", vbNormal) and same with vbDirectory. All my other files work fine. It's only the ones with commas that don't work. I don't expect anyone to spend time on this. If there isn't a known fix, I'll dig in and find another way &#128522;

I do have to say, this site is amazing. I am loving the ABCD DB and have been able to configure it to my own personal needs. I haven't done anything with access for years. I'm relearning, but with much more depth. Thank you for all your hard work!!
Kevin Robertson 
          
3 years ago
The problem is Access is using that comma as a column separator. Add this block before the line that adds the filename to the list box.

If InStr(FN, ",") > 0 Then
   FN = """" & FN & """"
End If


Do the same for the folders.
JoAnn Brookover OP 
   
3 years ago
You are my favorite person in the whole world today! I tried several variations of the double quotes, but nothing worked. Your code works perfectly. Thank you!!

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developer 31.
 

 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2025 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 4/29/2025 4:33:42 AM. PLT: 1s