close without saving - HELP

G

Guest

I have a database that is working perfectly with one exception.

The database is used to store links to pdf files. The one problem I run
into is that if an image is viewed access' program wants to save the file and
I get an error message that says the file cannot be save (over and over
again). How do I stop access from trying to do this save and just close the
form?

The "close" button is already set as follows:
Private Sub cmdClose_Click()
On Error GoTo Err_cmdClose_Click
If Me.Dirty = True Then
DoCmd.RunCommand acCmdUndo
End If
DoCmd.Close
Exit_cmdClose_Click:
Exit Sub
Err_cmdClose_Click:
MsgBox "Error " & Err.Number & " : " & Err.Description & " in
cmdClose_Click", vbExclamation, "Turner Scanning Database"
Resume Exit_cmdClose_Click
End Sub

Which is fine if someone tries to change anything in the form fields but how
do I stop it from trying to save changes to the attached document?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top