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?
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:
Private Sub Report_Open(Cancel As Integer)
Me.Filter = "[SomeColumn] = " & Forms!YourFormName!cboYourDropDownList
Me.FilterOn = True