Results 1 to 6 of 6
  1. #1
    CCW8 is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2011
    Posts
    8

    Hyperlink Variables

    Good Afternoon
    I am using the following in expression builder for a command button to open a .pdf file on the server.

    ="\\ServerName\DriveName\Database\Product\Folde r\" & [ProductNumber] & ".pdf"
    When I run this there is nothing.



    If I place the hyperlink without a variable number on the format tab-hyperlink address
    \\ServerName\DriveName\Database\Product\Folder\321 8.pdf

    it will open the file.
    Since I have thousands of files I do not want to manually enter...
    Last edited by CCW8; 04-28-2011 at 12:24 PM.

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by CCW8 View Post
    Since I have thousands of files I do not want to manually enter...
    so what do you want to do?

    this is about ambiguious as this little hijack is: https://www.accessforums.net/access/...nks-10676.html

  3. #3
    CCW8 is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2011
    Posts
    8
    I want to find out why this does not work and fix it. From what I understand this should work. I must be missing something. please enlighten me.

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    could it be because there is a space in the product number??

  5. #5
    CCW8 is offline Novice
    Windows XP Access 2007
    Join Date
    Apr 2011
    Posts
    8
    Sorry I was gone so long the weather here in Alabama was bad for awhile - That appears to be a typo in this page only there are no spaces in the number. I just tried using code builder from the cmd button and I am getting an
    error 13
    Type Mismatch
    in debug I get
    Set cmdPEBFile = PEBNumberTextBox (hi-lighted)
    here is my code

    Private Sub cmdPEBFile_Click()
    Dim cmdPEBFile As CommandButton

    Set cmdPEBFile = PEBNumberTextBox

    With cmdPEBFile

    .Visible = True

    .HyperlinkAddress = "\\ServerName\ServerDrive\Databases\EPEB\" & [PEBNumberTextBox] & ".pdf"

    End With
    End Sub

  6. #6
    nonoy is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    1
    Quote Originally Posted by CCW8 View Post
    Good Afternoon
    I am using the following in expression builder for a command button to open a .pdf file on the server.

    ="\\ServerName\DriveName\Database\Product\Folde r\" & [ProductNumber] & ".pdf"
    When I run this there is nothing.

    If I place the hyperlink without a variable number on the format tab-hyperlink address
    \\ServerName\DriveName\Database\Product\Folder\321 8.pdf

    it will open the file.
    Since I have thousands of files I do not want to manually enter...
    ======================

    hello everyone,

    i also working for the hyperlink builder and trying to link the file in jpeg format. what i did after struggling a couple of attempts is:

    just to share to everyone, to link a certain file in the form (based on the above example) :

    =\\ServerName\DriveName\Database\Product\Folder\&[ProductNumber]&".pdf"

    it works on my file.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 01-31-2011, 03:19 PM
  2. VBA in variables
    By smikkelsen in forum Access
    Replies: 3
    Last Post: 11-12-2010, 03:14 PM
  3. Variables in Forms
    By NewDeveloper in forum Forms
    Replies: 1
    Last Post: 06-20-2010, 08:04 AM
  4. Eval function with variables
    By tuna in forum Programming
    Replies: 3
    Last Post: 05-14-2010, 06:02 PM
  5. sql in vb variables
    By emilylu3 in forum Programming
    Replies: 3
    Last Post: 03-04-2006, 01:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums