Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Disable Quotes When Pasting Image Location
Stacey Doucette 
      
3 months ago
While following the Display Images Without Storing in the Database! video, I am storing my images to OneDrive.  It works, but when I paste the file path in the form field, it wants to put quotes around the path.  I don't want to ask the end users to remove the quotes.  Is there a setting or line of code to remove them automatically?  FYI, field I created to enter the file path is long text because the file path to OneDrive is longer than using the hard drive.  

Alternatively, is it recommended not to use OneDrive for this purpose?

Thanks!

Stacey
Stacey Doucette OP  @Reply  
      
3 months ago

Raymond Spornhauer  @Reply  
          
3 months ago
I would try this in your afterupdate event:

Replace(YOURFIELD, """", "" )

Reference Videos:
Why I Prefer Double-Double Quotes ("") Instead of a Single Quote (') in Microsoft Access

How to Escape Double Quotes for SQL Insert in Microsoft Access VBA

-Raymond
Raymond Spornhauer  @Reply  
          
3 months ago
Stacey Doucette OP  @Reply  
      
2 months ago
Hi Raymond.  Thank you for your suggestion.  That makes sense as a solution, but when I tried it, I got an error message saying:

Microsoft Access cannot find the object 'Replace(PoseImageLocation,"""","")
If 'Replace(PoseImageLocation,"""","")' is a new macro or macro group, make sure you have saved it and that you have typed its name correctly.  

I double checked my field name is spelled correctly.  Could you walk me through how to create a new macro with this logic, if you think that would work?
Donald Blackwell  @Reply  
       
2 months ago
Stacey If Access isn't recognizing "Replace" as a function, then you may need to check your references in the VB Editor. Make sure that the following are checked:

Visual Basic for Applications
Microsoft Access 16.0 Object Library
OLE Automation
Microsoft Office 16.0 Access database engine Object


If those are checked, then we'll likely need to see a screen shot of your code because:

=Replace(PoseImageLocation,"""","")

Should work provided that PoseImageLocation is the name of your control/field AND the data it contains doesn't contain spaces, otherwise Access may have other errors
Stacey Doucette OP  @Reply  
      
2 months ago
Hi Donald.  Thanks.  I am not using the VB editor, I used added the line of code in the property sheet After Update event.  I am not a strong coder--yet.  :)

Donald Blackwell  @Reply  
       
2 months ago
Ahh, that might explain it.

The property sheet looks for one of 3 things:
[Macro...]
[Event Procedure]
or the name of a public function from VBA

Literally, all you should need to do is cut that line from the property window and click the ellipsis (3 dots - ...) to the right of the After Update event in the property dialog to open the VB Editor.

It should automatically create a Sub for you:

Private Sub PoseImageLocation_AfterUpdate()
    
     PoseImageLocation = Replace(PoseImageLocation,"""","")
     Me.Dirty = False

End Sub


Access will place the Private Sub line and then End Sub Line for you and you just need to paste in the two lines above. The first should strip the quotes and the second saves the record.

Hopefully, this helps and gets it working for you. If not, feel free to put more here.

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

Next Unseen

 
New Feature: Comment Live View
 
 

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 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 6/14/2026 10:01:16 AM. PLT: 0s