Results 1 to 4 of 4
  1. #1
    apk19 is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    May 2015
    Posts
    30

    Turning a textbox into a command button for subform datasheet entries

    Got an interesting one.

    I want to dress-up a textbox in a subform as a command button. The reason is that buttons are not allowed in datasheet view, which is by far the best way to display the data.

    I've got the coding down pat:

    Private Sub Text13_Click()

    DoCmd.OpenForm "Applicants", , , "ClientID = '" & ClientID & "'"

    End Sub


    Tested and works fine. I even have it as a Hyperlink.



    Only problem is that the field returns "#Name?" error. Is there anyway of making the text as "GoTo" for all entries instead? Perhaps some very basic coding?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    You mean you have textbox IsHyperlink property set to Yes?

    Why would there be "#Name" error?

    What field is this textbox bound to - ClientID?

    Try: ="GoTo#" & [ClientID] & "#"
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    apk19 is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    May 2015
    Posts
    30
    Hi June7,

    You are correct in that the textbox "Is Hyperlink" property is set to Yes.

    Stupid me...I set the Control Source to "GoTo".

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Actually, my suggestion to construct hyperlink string probably not useful. Just do:

    ="GoTo"
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 1
    Last Post: 09-12-2014, 06:09 AM
  2. Replies: 8
    Last Post: 06-25-2014, 08:03 AM
  3. Replies: 4
    Last Post: 10-08-2012, 05:33 PM
  4. Replies: 16
    Last Post: 01-16-2012, 09:43 AM
  5. Replies: 6
    Last Post: 09-02-2010, 02:18 AM

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