How to Fix Access Error 2220 When Opening Images from a Form
Question details
The user needs to resolve an error that prevents images from loading correctly within an Access database form.

- Product
- Microsoft Access 2019
- Device & OS
- not provided
- Scenario
- Attempting to display an image stored on a local disk for the current record using an Access form.
- Observed behavior
- Access 2019 32-bit throws Error 2220 when the form event code tries to open the specified image file.
Ensure that the image files have not been moved, renamed, or deleted from their original disk location. Verify that you have the necessary read permissions for the folder where the images are currently stored.
Bind the Image Control Directly to the File Path Field
Instead of relying on complex VBA or macro event code to load the image, bind the form's image control directly to the table's text field that contains the file path.
This is the most stable method for displaying dynamic images in modern versions of Access. By linking the control directly to the data source, you bypass potential syntax errors in event codes.
Right-click your form in the navigation pane and select 'Design View'.
Click on the image control where the picture is supposed to be displayed.
Open the Property Sheet (F4), navigate to the 'Data' tab, and set the 'Control Source' property to the name of the text field that stores your image paths.

Verify and Correct VBA File Path Syntax
Check your form's event code for syntax errors, such as extra brackets or missing quotation marks, which commonly trigger Error 2220.
Need a simpler way to manage your data? Try WPS Office
While Microsoft Access is powerful for complex relational databases, managing data, paths, and images can sometimes result in frustrating VBA errors like Error 2220. If you are looking for a simpler, lightweight, and highly compatible office suite for your daily document and data management needs, WPS Office is an excellent free alternative.
- 1. Download WPS Office: Visit the official WPS website and click the download button for your operating system.
- 2. Install the Software: Run the downloaded installer and follow the simple on-screen instructions to complete the setup.
- 3. Open Your Files: Launch WPS Office and open your existing Word, Excel, or PowerPoint documents directly to start working.

Frequently Asked Questions
What does Error 2220 mean in Microsoft Access?
Error 2220 occurs when Microsoft Access cannot open or find the file specified for an image control or attachment. This is typically caused by a broken file path, a missing file, or a syntax error in the VBA code referencing the path.
Can I store images directly in the Access database instead of linking paths?
Yes, you can use the OLE Object or Attachment data type to store images directly within the database. However, this method is generally discouraged for large amounts of images as it can drastically inflate your database file size and lead to performance issues.
Why does my image path work in the table but not on the form?
This usually happens if the form's VBA code contains a syntax error when processing the path, or if the form's image control is not correctly mapped to the underlying text field. Binding the control directly to the field usually bypasses this issue.




