Add error handling to btnDespatchList_Click()
In the error handler, tell it to ignore error 2501
Example:
Private Sub btnDespatchList_Click()
On Error Goto Err_Handler
DoCmd.OpenReport ...
Exit_Hander
Exit Sub
Err_Handler
If Err.Number <> 2501 Then
MsgBox "Error " & Err.Number & " - " & Err.Description
End If
Resume Exit_Handler
End Sub

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
>I have a command button on a form that I am using to open a report showing
> items to be despatched on a job. I have the following code on the click
[quoted text clipped - 23 lines]
> please -
> I have used this before and it worked ok
PeterW - 05 May 2005 15:26 GMT
Many thanks for your reply I have altered the code and this now works fine
> Add error handling to btnDespatchList_Click()
> In the error handler, tell it to ignore error 2501
[quoted text clipped - 43 lines]
> > please -
> > I have used this before and it worked ok