Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2009
    Posts
    4

    Unanswered: How do you access the control tip data

    I am trying to run vb code to print a report using the DoCmd.OpenReport command. In a filtered datasheet, the data you filter out with the dropdown list is filter is somehow placed in the control tip text. If I could access that data, I could place it in my filter to print my report.

    Does anyone know what variable holds that data and how I could use it in the filter option of DoCmd.OpenReport?

    Thanks for any help at all.

  2. #2
    Join Date
    Jul 2004
    Location
    South Dakota
    Posts
    267
    Is the datasheet a subform on the main form that has a dropdown list that you use to filter the datasheet? If so then just reference the dropdown list from the code that you are using to open the report.

    An alternative is to place some code in the report's Open method that references the dropdown list to set the filter. Something like:

    Code:
    Private Sub Report_Open(Cancel As Integer)
        Me.Filter = "[SomeColumn] = " & Forms!YourFormName!cboYourDropDownList
        Me.FilterOn = True
    End Sub
    Hope that helps.

    C

  3. #3
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Directly answering the question, you can examine the ControlTip text of an object via its ControlTip Text property. But I don't think that is going to help you.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •