F
FA
I am using the following code to convert my a url address which is in
Varchar in SQL Server DB into hyperlink since my database is on SQL
Server and there is no such field as MS Access 's HyperLink in SQL
Server 2000
My field name is URL1
and in the DoubleClick Event i have =Connect()
The following functions getting the complire error " Invalide use of Me
on both Me.hwnd and Me.URL"
I added the Shell Library into my references but still getting the same
error
Please help what should i do ?
Public Declare Function ShellExecute Lib "shell32.dll" Alias
"ShellExecuteA" _
(ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) _
As Long
Public Sub Connect(strURL As String)
On Error GoTo Connect_Error
Dim StartDoc As Long
If Not IsNull(strURL) Then
StartDoc = ShellExecute(Me.hwnd, "open", Me.URL, _
"", "C:\", SW_SHOWNORMAL)
End If
Exit Sub
Connect_Error:
MsgBox "Error: " & Err & " " & Error
Exit Sub
End Sub
Varchar in SQL Server DB into hyperlink since my database is on SQL
Server and there is no such field as MS Access 's HyperLink in SQL
Server 2000
My field name is URL1
and in the DoubleClick Event i have =Connect()
The following functions getting the complire error " Invalide use of Me
on both Me.hwnd and Me.URL"
I added the Shell Library into my references but still getting the same
error
Please help what should i do ?
Public Declare Function ShellExecute Lib "shell32.dll" Alias
"ShellExecuteA" _
(ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) _
As Long
Public Sub Connect(strURL As String)
On Error GoTo Connect_Error
Dim StartDoc As Long
If Not IsNull(strURL) Then
StartDoc = ShellExecute(Me.hwnd, "open", Me.URL, _
"", "C:\", SW_SHOWNORMAL)
End If
Exit Sub
Connect_Error:
MsgBox "Error: " & Err & " " & Error
Exit Sub
End Sub