Results 1 to 3 of 3
  1. #1
    JAPA1972 is offline Novice
    Windows 7 32bit Access 2016
    Join Date
    Jan 2019
    Posts
    14

    Accessing content of text box in ribbon

    I have a box in a form ribbon with a text box (MyTextBox) and a button (MyButton). When a user clicks MyButton the program control is transferred to a public function (MyFuncion) in one of the modules. How can I access the MyTextbox content from MyFunction?

    Thanks

  2. #2
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,407
    You can make MyTextBox an argument for the public function
    private sub myButton_Click()
    Call MyFunction(MyTextBox)
    end sub

  3. #3
    JAPA1972 is offline Novice
    Windows 7 32bit Access 2016
    Join Date
    Jan 2019
    Posts
    14
    Quote Originally Posted by davegri View Post
    You can make MyTextBox an argument for the public function
    private sub myButton_Click()
    Call MyFunction(MyTextBox)
    end sub

    Thanks. The below code will not work. What am I doing wrong?

    <box id="box1" boxStyle="horizontal">
    <button id="buttonDECID" label="DEC ID" onAction = "DECID (editBoxDECID)" imageMso="FileDocumentManagementInformation" />
    <editBox id="editBoxDECID" />
    </box>

    Public Sub DECID(Control As IRibbonControl)
    Dim FolderName As String
    'do something
    End Sub

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

Similar Threads

  1. Replies: 16
    Last Post: 12-08-2017, 01:41 PM
  2. Viewing content of long text cells
    By mglevicky in forum Access
    Replies: 3
    Last Post: 01-23-2017, 09:38 AM
  3. accessing ribbon via vba
    By Alibaba66 in forum Programming
    Replies: 2
    Last Post: 01-16-2015, 12:41 PM
  4. Reports positioning boxes with text content
    By pierre86 in forum Reports
    Replies: 2
    Last Post: 09-15-2013, 01:05 PM
  5. Replies: 1
    Last Post: 08-13-2013, 09:39 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