Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Run time error 2202

Posted on 2006-03-30
Medium Priority
Last Modified: 2008-02-01
Hi all.

I get the following error when printing a report (it was working fine for the past 3 months until today), the report prints images with each record.

Run-time error '2220':
Microsoft Office Access can't open the file '\\path\909655.bmp'

This is the code I use to populate the image:
Option Compare Database
Option Explicit

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)

If Me!Expr3 = "" Or IsNull(Me!Expr3) Then

Me!ImageFrame.Visible = 0
    Me!ImageFrame.Visible = -1
    Me!ImageFrame.Picture = Me!Expr3
End If

End Sub

The Debugger highlights the following line: Me!ImageFrame.Picture = Me!Expr3

Expr3 is the following: Expr3: IIf([ImageFile] Is Null Or [ImageFile]="","","\\win2k3-2\apps\MAS90\images\ASC\" & [ImageFile])

Any ideas?
Question by:printmedia
LVL 34

Assisted Solution

flavo earned 1000 total points
ID: 16337234
Does the file in question exist?
LVL 34

Accepted Solution

Mike Eghtebas earned 1000 total points
ID: 16337238
It seems, you have a file name in your database which no longer exists in the directory; or it may have been renamed.

Btw, you can change your code to:

IIf(Nz([ImageFile],"")="","","\\win2k3-2\apps\MAS90\images\ASC\" & [ImageFile])

to do the exact same thing as your code does.


Author Comment

ID: 16337575
Got it! Someone renamed the file and didn't notify us. Thanks!

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Beware when using the ListIndex and the Column() properties of a listbox in Access 2007.  A bug has been identified in the Access 2007 listbox code which can cause the .ListIndex property to return a -1, and the .Columns(#) property to return a NULL…
When we develop an application in Ms Access 2016 we should also try to protect the queries, macros and table links. I know I may not have a permanent solution but for novice users, they will not manage to break your application. Below is the detail …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question