Results 1 to 5 of 5
  1. #1
    lithium is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Dec 2013
    Posts
    72

    Comma in filename?

    Okay, I am currently trying to get my database to load a picture from a folder depending on what filename the user selects from a listbox populated on load from that folder. The issue I have comes down to naming conventions used, the format has always been LAST, FIRST INITIAL.NUMBER.jpg and I can only get it to work if I replace the comma with a period.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    Filenames can't have commas. Its the law.
    use underscore.

  3. #3
    lithium is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Dec 2013
    Posts
    72
    Yeah, well the thing is that I have hundreds of jpegs that all have commas in them and I don't want to go through each one and change the names. Isn't there a way to still populate the names and read the commas?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Commas are allowed in filenames but apparently not a good practice.

    What method are you using to 'load' - load to where? I had no problem loading it into an Image control.

    Could get a file manager program that has a utility to do a global replace on all the filenames in a folder. Change the comma to underscore. Change file naming policy. Just use unique ID (employee, customer?) in the filename.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Using more than one period in a file name (for the extension) is also not a good practice. Best practice is no punctuation or special characters (exception is the underscore) in file names.

    I have seen where a file name like

    FileName.Ver2.SubVer1.ext

    caused programs to bomb. Changing the file name to

    FileName_Ver2_SubVer1.ext

    solved the problems.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. importing data if it's a certain filename
    By token_remedie in forum Access
    Replies: 3
    Last Post: 09-25-2011, 05:46 PM
  2. ahtCommonFileOpenSave filename issue
    By seleese in forum Programming
    Replies: 1
    Last Post: 04-13-2011, 01:17 PM
  3. Variuse FileName When Export
    By shay in forum Import/Export Data
    Replies: 1
    Last Post: 12-01-2010, 11:36 AM
  4. Date and time in filename
    By frankesjoberg in forum Import/Export Data
    Replies: 1
    Last Post: 03-02-2010, 12:35 PM
  5. Filename displaying with image
    By Rob Parker in forum Forms
    Replies: 2
    Last Post: 01-13-2010, 05:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums