473,396 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to activate hyperlink in text box

Hello,

I have a problem with hyperlink.
I have a text box that contains link to the document. I enter the link by clicking on the button "add link". When I add link, the windows browser opens and i can search for exact document. But when I save the path in the Link text box, the link doent work. It is stored in News table and I changed it for hyperlink but still doesnt work. I noticed that when I am saving the path, it saves me the path as a link name that is shown in the text box, but the hyperlink path is empty.
How to make it works?
I would be grateful for help.


Greets

Greg
Nov 14 '07 #1
15 37808
ADezii
8,834 Expert 8TB
Hello,

I have a problem with hyperlink.
I have a text box that contains link to the document. I enter the link by clicking on the button "add link". When I add link, the windows browser opens and i can search for exact document. But when I save the path in the Link text box, the link doent work. It is stored in News table and I changed it for hyperlink but still doesnt work. I noticed that when I am saving the path, it saves me the path as a link name that is shown in the text box, but the hyperlink path is empty.
How to make it works?
I would be grateful for help.


Greets

Greg
You cannot Add a Hyperlink to a Text Box on a Form, when you attempt this a Label containing the Hyperlink will be added to the Form, and clicking on it will Navigate to the Destination. It obviously will not be Bound or saved to a Table. If a Field in a Table is defined as Hyperlink and Links are added at the Table Level, you can then set the Control Source of a Text Box to this Field and you can activate the Hyperlink in this manner. You can also programmatically add a Hyperlink to a Text Box on a Form and Bind it to the underlying Field.
Nov 14 '07 #2
You cannot Add a Hyperlink to a Text Box on a Form, when you attempt this a Label containing the Hyperlink will be added to the Form, and clicking on it will Navigate to the Destination. It obviously will not be Bound or saved to a Table. If a Field in a Table is defined as Hyperlink and Links are added at the Table Level, you can then set the Control Source of a Text Box to this Field and you can activate the Hyperlink in this manner. You can also programmatically add a Hyperlink to a Text Box on a Form and Bind it to the underlying Field.
thank you for reply. but i think i wasnt too clear.
actually i can store this hyperlink to the table field but then i cannot open hyperlink.

Maybe i will describe it more detailed:

i have News Table where there is a News.Link field (it is set as hyperlink).

then I have News Form where I have text box - Link - which has control soucre News.Link from the News Table.

Under that Link I have button which opens browser and then in the folders on the hard drive I can choose one document. I press save and the whole path is saved on this text box Link, which is bound to News.Link.

But this paths doesnt open a hyperlink, although I set hyperlink options in Form and in Table.

Now I want to be able to open document just by clicking on that text box field in Form. Now I am clicking and nothing happens.

Do you know how to do it?
Nov 14 '07 #3
ADezii
8,834 Expert 8TB
thank you for reply. but i think i wasnt too clear.
actually i can store this hyperlink to the table field but then i cannot open hyperlink.

Maybe i will describe it more detailed:

i have News Table where there is a News.Link field (it is set as hyperlink).

then I have News Form where I have text box - Link - which has control soucre News.Link from the News Table.

Under that Link I have button which opens browser and then in the folders on the hard drive I can choose one document. I press save and the whole path is saved on this text box Link, which is bound to News.Link.

But this paths doesnt open a hyperlink, although I set hyperlink options in Form and in Table.

Now I want to be able to open document just by clicking on that text box field in Form. Now I am clicking and nothing happens.

Do you know how to do it?
I answered a similar Question several weeks ago, referring to this Post should help you. The key point to remember is that a Hyperlink can consist of three Sections delimited by a '#' sign. Specifying only the URL will not work, it will simply be assigned to the Caption.
Inserting a Hyperlink into a Table
Nov 14 '07 #4
I answered a similar Question several weeks ago, referring to this Post should help you. The key point to remember is that a Hyperlink can consist of three Sections delimited by a '#' sign. Specifying only the URL will not work, it will simply be assigned to the Caption.
Inserting a Hyperlink into a Table
Thx for link. It sounds like the answer for my question. but i dont know how to put it to my database. I quite begginer so some things i dont understand.

So:
What is this File Dialog: msoFileDialogFilePicker, msoFileDialogViewDetails
Is it module or sth like that?
I have to modules: openSavebrowser and basBrowseFiles for opening the browser and inserting the file path into the text box (but it put only the path in the text display part, not in path part).
Maybe I have wrong module (FileDialogFilePicer??). Do you have maybe codes for that FilesDialogs that are mentioned in the code from that link?

Where shall I insert that code that was in that link you gave me? I have button that is named link2. shall i put in into onclick option in Event Procedures?

greets
Nov 14 '07 #5
ADezii
8,834 Expert 8TB
Thx for link. It sounds like the answer for my question. but i dont know how to put it to my database. I quite begginer so some things i dont understand.

So:
What is this File Dialog: msoFileDialogFilePicker, msoFileDialogViewDetails
Is it module or sth like that?
I have to modules: openSavebrowser and basBrowseFiles for opening the browser and inserting the file path into the text box (but it put only the path in the text display part, not in path part).
Maybe I have wrong module (FileDialogFilePicer??). Do you have maybe codes for that FilesDialogs that are mentioned in the code from that link?

Where shall I insert that code that was in that link you gave me? I have button that is named link2. shall i put in into onclick option in Event Procedures?

greets
The Link that I provided for you also shows sample FileDialog code.
Nov 14 '07 #6
The Link that I provided for you also shows sample FileDialog code.
I saw that code but i dont know exactly how to change it...
msoFileDialogFilePicker, msoFileDialogViewDetails - i dont know my equivalent of thos fields...
are there modules codes or sth else???...
I will follow that sample you gave on my example, and if you could check if this is correct i would be greatful:

What is the Field Name? Link

Is this Field defined as a Hyperlink Data Type in the Table? YES

What is the Table's Name? NEWS

What URL are you trying to Update the Field to? (Microsoft.com, Google.com, TheScripts.com, etc.)
I have text box: Link which is bound to [News].[Link] field.


Now what i need is to be able to add paths of files into Link field as a hyperlink path.

So where should i put this code:
Expand|Select|Wrap|Line Numbers
  1. Dim varItem As Variant
  2.  
  3. With Application.FileDialog(msoFileDialogFilePicker) what should i put into msoFileDialogPicker?? 
  4.  
  5. With .Filters
  6.      .Clear
  7.      .Add "Text Files", "*.txt"
  8.      .Add "Database Files", "*.mdb"
  9.      .Add "All Files", "*.*"
  10.    End With
  11.        'The Show Method returns True if 1 or more files are selected
  12.        .AllowMultiSelect = True
  13.        .FilterIndex = 2     'Database files
  14.        .ButtonName = "Link2"
  15.        .InitialFileName = vbNullString
  16.        .InitialView = msoFileDialogViewDetails' (and what is that FiledDialogViewDetails?? )
  17.  
  18.        .Title = "Find the damn File!"
  19.           If .Show Then
  20.             For Each varItem In .SelectedItems     'There will only be 1
  21.               Me![Link] = varItem
  22.             Next varItem
  23.           End If
  24. End With
I am quite lost with that and i dont know how to proceed further...

greets
Greg
Nov 16 '07 #7
ADezii
8,834 Expert 8TB
I saw that code but i dont know exactly how to change it...
msoFileDialogFilePicker, msoFileDialogViewDetails - i dont know my equivalent of thos fields...
are there modules codes or sth else???...
I will follow that sample you gave on my example, and if you could check if this is correct i would be greatful:

What is the Field Name? Link

Is this Field defined as a Hyperlink Data Type in the Table? YES

What is the Table's Name? NEWS

What URL are you trying to Update the Field to? (Microsoft.com, Google.com, TheScripts.com, etc.)
I have text box: Link which is bound to [News].[Link] field.


Now what i need is to be able to add paths of files into Link field as a hyperlink path.

So where should i put this code:
Expand|Select|Wrap|Line Numbers
  1. Dim varItem As Variant
  2.  
  3. With Application.FileDialog(msoFileDialogFilePicker) what should i put into msoFileDialogPicker?? 
  4.  
  5. With .Filters
  6.      .Clear
  7.      .Add "Text Files", "*.txt"
  8.      .Add "Database Files", "*.mdb"
  9.      .Add "All Files", "*.*"
  10.    End With
  11.        'The Show Method returns True if 1 or more files are selected
  12.        .AllowMultiSelect = True
  13.        .FilterIndex = 2     'Database files
  14.        .ButtonName = "Link2"
  15.        .InitialFileName = vbNullString
  16.        .InitialView = msoFileDialogViewDetails '(and what is that FiledDialogViewDetails?? )
  17.  
  18.        .Title = "Find the damn File!"
  19.           If .Show Then
  20.             For Each varItem In .SelectedItems     'There will only be 1
  21.               Me![Link] = varItem
  22.             Next varItem
  23.           End If
  24. End With
I am quite lost with that and i dont know how to proceed further...

greets
Greg
Don't have the time right now but I'll give you step-by-step detailed information as soon as I get the chance, hopefully tonight.
Nov 16 '07 #8
Don't have the time right now but I'll give you step-by-step detailed information as soon as I get the chance, hopefully tonight.
ok no problem. i will check it tommorow then. thx
Nov 16 '07 #9
ADezii
8,834 Expert 8TB
ok no problem. i will check it tommorow then. thx
The following code, placed in the Click() Event of a Command Button named cmdPopulateHyperlink will:
  1. Open a File Dialog Box, and allow you to select only 1 File of any type.
  2. Allow you to customize the Button and Dialog Title Captions within the File Dialog Box.
  3. Write the Hyperlink Caption and Address (both are required) to the Link Text Box on the Current Form. The Control Source for this Link Text Box is the [Link] Field.
  4. The Record Source for the Form is the Table News.
  5. The code has been thoroughly tested and is fully functional. I inserted Comments where I thought they may be needed.
  6. Any questions, feel free to ask.
Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdPopulateHyperlink_Click()
  2. 'First, set a Reference to the Microsoft Office XX.X Object Library
  3.  
  4. Dim strButtonCaption As String, strDialogTitle As String
  5. Dim strHyperlinkFile As String
  6.  
  7. 'Define your own Captions if necessary
  8. strButtonCaption = "Save Hyperlink"
  9. strDialogTitle = "Select File to Create Hyperlink to"
  10.  
  11. With Application.FileDialog(msoFileDialogFilePicker)
  12.   With .Filters
  13.     .Clear
  14.     .Add "All Files", "*.*"     'Allow ALL File types
  15.   End With
  16.   'The Show Method returns True if 1 or more files are selected
  17.     .AllowMultiSelect = False       'Critical Line
  18.     .FilterIndex = 1 'Database files
  19.     .ButtonName = strButtonCaption
  20.     .InitialFileName = vbNullString
  21.     .InitialView = msoFileDialogViewDetails     'Detailed View
  22.     .Title = strDialogTitle
  23.   If .Show Then
  24.     For Each varItem In .SelectedItems 'There will only be 1
  25.       'Caption and Address of Hyperlink will be the same (Caption#Address)
  26.       strHyperlinkFile = varItem & "#" & varItem
  27.         Me![Link] = strHyperlinkFile
  28.     Next varItem
  29.   End If
  30. End With
  31. End Sub
  32.  
Nov 16 '07 #10
The following code, placed in the Click() Event of a Command Button named cmdPopulateHyperlink will:
  1. Open a File Dialog Box, and allow you to select only 1 File of any type.
  2. Allow you to customize the Button and Dialog Title Captions within the File Dialog Box.
  3. Write the Hyperlink Caption and Address (both are required) to the Link Text Box on the Current Form. The Control Source for this Link Text Box is the [Link] Field.
  4. The Record Source for the Form is the Table News.
  5. The code has been thoroughly tested and is fully functional. I inserted Comments where I thought they may be needed.
  6. Any questions, feel free to ask.
Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdPopulateHyperlink_Click()
  2. 'First, set a Reference to the Microsoft Office XX.X Object Library
  3.  
  4. Dim strButtonCaption As String, strDialogTitle As String
  5. Dim strHyperlinkFile As String
  6.  
  7. 'Define your own Captions if necessary
  8. strButtonCaption = "Save Hyperlink"
  9. strDialogTitle = "Select File to Create Hyperlink to"
  10.  
  11. With Application.FileDialog(msoFileDialogFilePicker)
  12.   With .Filters
  13.     .Clear
  14.     .Add "All Files", "*.*"     'Allow ALL File types
  15.   End With
  16.   'The Show Method returns True if 1 or more files are selected
  17.     .AllowMultiSelect = False       'Critical Line
  18.     .FilterIndex = 1 'Database files
  19.     .ButtonName = strButtonCaption
  20.     .InitialFileName = vbNullString
  21.     .InitialView = msoFileDialogViewDetails     'Detailed View
  22.     .Title = strDialogTitle
  23.   If .Show Then
  24.     For Each varItem In .SelectedItems 'There will only be 1
  25.       'Caption and Address of Hyperlink will be the same (Caption#Address)
  26.       strHyperlinkFile = varItem & "#" & varItem
  27.         Me![Link] = strHyperlinkFile
  28.     Next varItem
  29.   End If
  30. End With
  31. End Sub
  32.  

Thank you very much for help. Now it is more clear for me how it works.
However i have a problem while clicking the button:
Compile error: Method or data member not found.

I pasted that code in VB in On click option. My button name is cmdPopulateHyperlink. And the other decribed option are the same. So i dont know what to do to work it out.
I also put references for Microsoft Office 12.0 Object Library
I dont know if its tell you sth but all the time i click button it shows me that error and then in the line : With Application.FileDialog(msoFileDialogFilePicker), the work FileDialog is selected (not in yellow like in the beggining but in blue, like selecting for copying). I know that maybe its sth simple and i have really stupid remark, but as i said in the beggining, this is my beggining with VB...

greets
Greg
Nov 19 '07 #11
ADezii
8,834 Expert 8TB
Thank you very much for help. Now it is more clear for me how it works.
However i have a problem while clicking the button:
Compile error: Method or data member not found.

I pasted that code in VB in On click option. My button name is cmdPopulateHyperlink. And the other decribed option are the same. So i dont know what to do to work it out.
I also put references for Microsoft Office 12.0 Object Library
I dont know if its tell you sth but all the time i click button it shows me that error and then in the line : With Application.FileDialog(msoFileDialogFilePicker), the work FileDialog is selected (not in yellow like in the beggining but in blue, like selecting for copying). I know that maybe its sth simple and i have really stupid remark, but as i said in the beggining, this is my beggining with VB...

greets
Greg
Just for verification, what Version of Access are you using?
Nov 19 '07 #12
Just for verification, what Version of Access are you using?
I am using: MS Access 2000
Nov 19 '07 #13
I am using: MS Access 2000
If it helps, before i was using module code for file browser like this (but it saved me only display text, not hyperlink):
Expand|Select|Wrap|Line Numbers
  1. '.=========================================================================
  2. '.Browse Files Module
  3. '.Copyright 1999 Tribble Software.  All rights reserved.
  4. '.Phone        : (616) 455-2055
  5. '.E-mail       : carltribble@earthlink.net
  6. '.=========================================================================
  7. ' DO NOT DELETE THE COMMENTS ABOVE.  All other comments in this module
  8. ' may be deleted from production code, but lines above must remain.
  9. '--------------------------------------------------------------------------
  10. '.Description  : This module calls directly into comdlg32.dll to allow user
  11. '.               to select a filename using the Windows Common Dialog.  The
  12. '.               user may browse for a file, or enter a file name directly.
  13. '.Written By   : Carl Tribble
  14. '.Date Created : 04/05/1999 09:56:31 AM
  15. '.Rev. History :
  16. ' Comments     : Normally, to use the Common Dialog you need to physically
  17. '                place the ActiveX control onto a form and then use code
  18. '                behind the form to implement its functionality.  This
  19. '                module allows you to incorporate the functionality of the
  20. '                File Open/Save part of the Common Dialog without the
  21. '                ActiveX control itself. This module is completely self-
  22. '                contained.  Simply copy it into your database to use it.
  23. '.-------------------------------------------------------------------------
  24. '.
  25. ' ADDITIONAL NOTES:
  26. '
  27. '  This module only provides the Open/Save file dialog, not the other
  28. '  CommonDialog interfaces (ColorChooser, Help, PrintDialog, etc.)
  29. '
  30. '  If you want your user to browse for folder names (paths) you must use
  31. '  the module basBrowseFolders instead.
  32. '
  33. '  TO STREAMLINE this module for production programs, you should remove:
  34. '     1) Unnecessary comments
  35. '     2) Flag Constants which you do not intend to use.
  36. '     3) The test procedure tsGetFileFromUserTest
  37. '
  38. '--------------------------------------------------------------------------
  39. '
  40. ' INSTRUCTIONS:
  41. '
  42. '         ( For a working example, open the Debug window  )
  43. '         ( and enter tsGetFileFromUserTest.              )
  44. '
  45. '.All the arguments for the function are optional.  You may call it with no
  46. '.arguments whatsoever and simply assign its return value to a variable of
  47. '.the Variant type.  For example:
  48. '.
  49. '.   varFileName = tsGetFileFromUser()
  50. '.
  51. '.The function will return:
  52. '.   the full path and filename selected or entered by the user, or
  53. '.   Null if an error occurs or if the user presses Cancel.
  54. '.
  55. '.Optional arguments may include any of the following:
  56. '. rlngFlags      : one or more of the tscFN* constants (declared below)
  57. '.                  Combine multiple constants like this:
  58. '.                   tscFNHideReadOnly Or tscFNFileMustExist
  59. '. strInitialDir : the directory to display when dialog opens
  60. '. strFilter     : a string containing any filters you want to use. Each
  61. '.                 part must be separated by the vbNullChar. -example below
  62. '. lngFilterIndex: a 1-based index indicating which filter to start with.
  63. '. strDefaultExt : Extension to use if user does not enter one.
  64. '. strFileName   : Default File to display in the File Name text box.
  65. '. strDialogTitle: Caption to display in the dialog's title bar.
  66. '. fOpenFile     : Boolean-True for the Open dialog, False for Save dialog.
  67. '
  68. ' FILTER EXAMPLE: The filter must be a string containing two parts for each
  69. '  filter.  The first part is the Description, it is what the user will see
  70. '  in the Files of Type box, e.g. "Text Files (*.txt)".  The second part is
  71. '  the actual filter, e.g. "*.txt".  Each part and each filter must be
  72. '  separated by the vbNullChar.  For example, to provide two filters, one for
  73. '  *.mdb files, and one for all files, use a statement like this:
  74. '
  75. '  strFilter = "Access (*.mdb)" & vbNullChar & "*.mdb" _
  76. '   & vbNullChar & "All Files (*.*)" & vbNullChar & "*.*"
  77. '
  78. '  Then pass your strFilter variable as the strFilter argument for the call
  79. '  to tsGetFileFromUser()
  80. '
  81. '.--------------------------------------------------------------------------
  82. '.
  83.  
  84. Private Declare Function ts_apiGetOpenFileName Lib "comdlg32.dll" _
  85.  Alias "GetOpenFileNameA" (tsFN As tsFileName) As Boolean
  86.  
  87. Private Declare Function ts_apiGetSaveFileName Lib "comdlg32.dll" _
  88.  Alias "GetSaveFileNameA" (tsFN As tsFileName) As Boolean
  89.  
  90. Private Declare Function CommDlgExtendedError Lib "comdlg32.dll" () As Long
  91.  
  92. Private Type tsFileName
  93.    lStructSize As Long
  94.    hwndOwner As Long
  95.    hInstance As Long
  96.    strFilter As String
  97.    strCustomFilter As String
  98.    nMaxCustFilter As Long
  99.    nFilterIndex As Long
  100.    strFile As String
  101.    nMaxFile As Long
  102.    strFileTitle As String
  103.    nMaxFileTitle As Long
  104.    strInitialDir As String
  105.    strTitle As String
  106.    Flags As Long
  107.    nFileOffset As Integer
  108.    nFileExtension As Integer
  109.    strDefExt As String
  110.    lCustData As Long
  111.    lpfnHook As Long
  112.    lpTemplateName As String
  113. End Type
  114.  
  115. ' Flag Constants
  116. Public Const tscFNAllowMultiSelect = &H200
  117. Public Const tscFNCreatePrompt = &H2000
  118. Public Const tscFNExplorer = &H80000
  119. Public Const tscFNExtensionDifferent = &H400
  120. Public Const tscFNFileMustExist = &H1000
  121. Public Const tscFNPathMustExist = &H800
  122. Public Const tscFNNoValidate = &H100
  123. Public Const tscFNHelpButton = &H10
  124. Public Const tscFNHideReadOnly = &H4
  125. Public Const tscFNLongNames = &H200000
  126. Public Const tscFNNoLongNames = &H40000
  127. Public Const tscFNNoChangeDir = &H8
  128. Public Const tscFNReadOnly = &H1
  129. Public Const tscFNOverwritePrompt = &H2
  130. Public Const tscFNShareAware = &H4000
  131. Public Const tscFNNoReadOnlyReturn = &H8000
  132. Public Const tscFNNoDereferenceLinks = &H100000
  133.  
  134. Public Function tsGetFileFromUser( _
  135.  Optional ByRef rlngflags As Long = 0&, _
  136.  Optional ByVal strInitialDir As String = "", _
  137.  Optional ByVal strFilter As String = "All Files (*.*)" & vbNullChar & "*.*", _
  138.  Optional ByVal lngFilterIndex As Long = 1, _
  139.  Optional ByVal strDefaultExt As String = "", _
  140.  Optional ByVal strFileName As String = "", _
  141.  Optional ByVal strDialogTitle As String = "", _
  142.  Optional ByVal fOpenFile As Boolean = True) As Variant
  143.  
  144.    On Error GoTo tsGetFileFromUser_Err
  145.    Dim tsFN As tsFileName
  146.    Dim strFileTitle As String
  147.    Dim fResult As Boolean
  148.  
  149.    ' Allocate string space for the returned strings.
  150.    strFileName = Left(strFileName & String(256, 0), 256)
  151.    strFileTitle = String(256, 0)
  152.  
  153.    ' Set up the data structure before you call the function
  154.    With tsFN
  155.       .lStructSize = Len(tsFN)
  156.       .hwndOwner = Application.hWndAccessApp
  157.       .strFilter = strFilter
  158.       .nFilterIndex = lngFilterIndex
  159.       .strFile = strFileName
  160.       .nMaxFile = Len(strFileName)
  161.       .strFileTitle = strFileTitle
  162.       .nMaxFileTitle = Len(strFileTitle)
  163.       .strTitle = strDialogTitle
  164.       .Flags = rlngflags
  165.       .strDefExt = strDefaultExt
  166.       .strInitialDir = strInitialDir
  167.       .hInstance = 0
  168.       .strCustomFilter = String(255, 0)
  169.       .nMaxCustFilter = 255
  170.       .lpfnHook = 0
  171.    End With
  172.  
  173.    ' Call the function in the windows API
  174.    If fOpenFile Then
  175.       fResult = ts_apiGetOpenFileName(tsFN)
  176.    Else
  177.       fResult = ts_apiGetSaveFileName(tsFN)
  178.    End If
  179.  
  180.    ' If the function call was successful, return the FileName chosen
  181.    ' by the user.  Otherwise return null.  Note, the CancelError property
  182.    ' used by the ActiveX Common Dialog control is not needed.  If the
  183.    ' user presses Cancel, this function will return Null.
  184.    If fResult Then
  185.       rlngflags = tsFN.Flags
  186.       tsGetFileFromUser = tsTrimNull(tsFN.strFile)
  187.    Else
  188.       tsGetFileFromUser = Null
  189.    End If
  190.  
  191. tsGetFileFromUser_End:
  192.    On Error GoTo 0
  193.    Exit Function
  194.  
  195. tsGetFileFromUser_Err:
  196.    Beep
  197.    MsgBox Err.Description, , "Error: " & Err.Number _
  198.     & " in function basBrowseFiles.tsGetFileFromUser"
  199.    Resume tsGetFileFromUser_End
  200.  
  201. End Function
  202.  
  203. ' Trim Nulls from a string returned by an API call.
  204.  
  205. Private Function tsTrimNull(ByVal strItem As String) As String
  206.  
  207.    On Error GoTo tsTrimNull_Err
  208.    Dim I As Integer
  209.  
  210.    I = InStr(strItem, vbNullChar)
  211.    If I > 0 Then
  212.        tsTrimNull = Left(strItem, I - 1)
  213.    Else
  214.        tsTrimNull = strItem
  215.    End If
  216.  
  217. tsTrimNull_End:
  218.    On Error GoTo 0
  219.    Exit Function
  220.  
  221. tsTrimNull_Err:
  222.    Beep
  223.    MsgBox Err.Description, , "Error: " & Err.Number _
  224.     & " in function basBrowseFiles.tsTrimNull"
  225.    Resume tsTrimNull_End
  226.  
  227. End Function
Nov 19 '07 #14
Everything is ok now.
Inspired by your code, i have simply copied "#" & into following line:

Me![Link] = "#" & varFileName

and now its working :)

it was so easy solution that now i am embaressed by posting that question :)

Thx very much for help and inspiration :)


Greg
Nov 19 '07 #15
ADezii
8,834 Expert 8TB
Everything is ok now.
Inspired by your code, i have simply copied "#" & into following line:

Me![Link] = "#" & varFileName

and now its working :)

it was so easy solution that now i am embaressed by posting that question :)

Thx very much for help and inspiration :)


Greg
You are quite welcome. Many Users are confused when it comes to programmatically adding Hyperlinks to a Form Field Bound to a HyperLink Data Type. As a matter of fact, this will probably be the Subject of the next Tip of the Week.
Nov 19 '07 #16

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Tero Partanen | last post by:
Hello! I'm writing about a rather peculiar problem I'm having with Access2000. I have a table in which I have created one hyperlink-type field. I have given the field a default value which is...
9
by: Paul | last post by:
Hi I have a data grid with a hyperlink column. the colum has numbers like 00001,000002, ect. Just wondering how to get the text value of the cell as tempstring =...
19
by: Joe | last post by:
I have an aspx page (referred to here as page_1) with a datagrid whose first column contains hyperlinks. When a user clicks one of these hyperlinks, he will navigate to another aspx page (referred...
2
by: Keith Wilby | last post by:
I have a personnel database with a hyperlink field which contains the path to a mugshot. I was thinking of combining the hyperlink field with the surname field by putting the surname in the...
20
by: tshad | last post by:
I had posted this problem earlier and just noticed that the Hyperlink is the problem. Apparently, it doesn't figure out the path correctly. It uses the path of the file it is in, even if it is...
13
ADezii
by: ADezii | last post by:
Recently, there have been several questions and much confusion concerning the Topic of Hyperlinks. Specifically, Users wanted to know how to retrieve a File Name from a FileDialog Box, copy the Name...
1
by: k lee | last post by:
I want to create a linkButton to activate my hyperlink which will open a new page in a new window. I would like to know how to code the code of activate the hyperlink which I wish to place it in the...
1
by: suvaline | last post by:
I dont know much about VBA, but maybe somebody can help me ;) I have this kind of SUB .. Sub kama2() Worksheets("kama").Activate Range("A51").Select Selection.Hyperlinks(1).Follow...
10
by: sierra7 | last post by:
I'm trying to create a form where a user enters a document reference number and then clicks a command button to add a hyperlink to the document, via a file picker. Thanks to Adezii's excellent...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.