AnnGetHyperlinkType example for Visual Basic
Note: Also works with Access 95 and 97.
Note: This topic is for Document/Medical only.
The following is an example of AnnHyperlink event code which includes a call to AnnGetHyperlinkType.
Private Sub Lead1_AnnHyperlink(ByVal hObject As Long, ByVal iParamCount As Integer, ByVal lParam1 As Long, ByVal lParam2 As Long, ByVal lParam3 As Long, ByVal lParam4 As Long, ByVal lParam5 As Long)
Dim msgstr As String
Dim nType As Integer
nType = Lead1.AnnGetHyperlinkType(hObject)
If ((nType = ANNLINK_ANNEVENT5) Or (nType = ANNLINK_ANNEVENT)) Then
If iParamCount >= 0 Then
msgstr = CStr(iParamCount) & " params are valid" & Chr(13)
End If
If iParamCount >= 1 Then
msgstr = msgstr & "Param1: " & CStr(lParam1) & Chr(13)
End If
If iParamCount >= 2 Then
msgstr = msgstr & "Param2: " & CStr(lParam2) & Chr(13)
End If
If iParamCount >= 3 Then
msgstr = msgstr & "Param3: " & CStr(lParam3) & Chr(13)
End If
If iParamCount >= 4 Then
msgstr = msgstr & "Param4: " & CStr(lParam4) & Chr(13)
End If
If iParamCount = 5 Then
msgstr = msgstr & "Param5: " & CStr(lParam5) & Chr(13)
End If
Else
msgstr = "Invalid Type"
End If
MsgBox msgstr
End Sub