How to stop warning on hyperlink subaddress

ShanVel

ShanMug
Local time
Today, 12:07
Joined
Oct 12, 2005
Messages
51
Dear folks,

I appreciate your help.
I don't know how to stop this warning message. Microsoft Office Access can't follow the hyperlink to "rptMyRportName” Please verify the destination.

I have a command button on a form whose hperlink subaddress property is set to a report name "rptMyRportName”. It works fine. However, if I don't have a data on the report I would like to give the user just a warning message without opening the report. I have the following code on the report's no data event as follows:

Private Sub Report_NoData (Cancel As Integer)
On Error GoTo ErrorHandler
MsgBox "There is no data for this report. Canceling report..."
‘Cancel = -1
‘DoCmd.SetWarnings False
ErrorHandlerExit:
Exit Sub
ErrorHandler:
MsgBox "Error No: " & Err.Number & "; Description: " & Err.Description
Resume ErrorHandlerExit
End Sub

Still, I can’t stop this "can't follow the hyperlink … " message.

If anyone can give me some tips that would greatly appreciated. I searched the forum; unfortunately I don’t have much luck.

Thanks/Shan.
 

Users who are viewing this thread

Back
Top Bottom