Results 1 to 4 of 4
  1. #1
    mainerain is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Location
    Maine, USA
    Posts
    146

    vba for button, hyperlink error


    This code works fine on one form but not on others and I can't determine why.

    Get Run-time error '2046'
    The command or action'EditHyperlink' isn't available now.

    Code:
    btnFolderLink_Click()
    Me.FolderLink.SetFocus
    DoCmd.RunCommand acCmdEditHyperlink
    End Sub

  2. #2
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Is the field on the non-working form a hyperlink field?
    The folderLink field is getting the focus?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    mainerain is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Sep 2018
    Location
    Maine, USA
    Posts
    146
    That's it!!!!! The ones that weren't working had "Is Hyperlink" set to no on the format tab. Thanks so much!

    Just want to say that I try hard to figure out what is wrong on my own before coming to this forum. Sometimes I'll sleep on a problem and figure it out on my own, other times when I need to make some progress (like today) I come to this repository of knowledge. Such a blessing to have you and others on this site to give me a hand.

  4. #4
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Glad to have been of some help, and thanks for the appreciation comments. Not everyone appreciates that we 'work' for free.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 4
    Last Post: 06-17-2021, 01:32 AM
  2. Replies: 4
    Last Post: 02-20-2015, 09:32 AM
  3. Creating a Browse button to create a Hyperlink
    By detaylor1242 in forum Forms
    Replies: 5
    Last Post: 07-30-2013, 11:48 AM
  4. Add button to follow hyperlink in table
    By stanley721 in forum Forms
    Replies: 6
    Last Post: 06-22-2013, 08:49 AM
  5. Command button as a Hyperlink
    By Alaska1 in forum Access
    Replies: 3
    Last Post: 10-21-2010, 02:08 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