Access error 5152 and how to avoid it

Office for Mere Mortals
Your beginners guide to the secrets of Microsoft Office
Invalid email address
Tips and help for Word, Excel, PowerPoint and Outlook from Microsoft Office experts.  Give it a try. You can unsubscribe at any time.  Office for Mere Mortals has been running for over 20 years, we've never, ever revealed or sold subscriber details.  Privacy policy

If you get Error #5152 when running code that saves a file, check whether there is a date formatted with slashes (2/15/2010) in the file name.

Slashes are not permitted in file names, so you will get this error when trying to save a file including a date in this format.

To avoid this error, format a date used in a file name with a format that uses dashes (2-15-2010 or 15-Feb-2010) instead of slashes.

Latest news & secrets of Microsoft Office

Microsoft Office experts give you tips and help for Word, Excel, PowerPoint and Outlook.

Give it a try. You can unsubscribe at any time.  Office Watch has been running for over 20 years, we've never, ever revealed or sold subscriber details.  Privacy policy
Invalid email address