Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Control Tip Text (A2000)

    Is it possible to use the control tip text to give information, ie.

    I would like to use this property as a DLookUp for instance.

    I tried to find a field content in this (=[sUnitID] but didn't work.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Control Tip Text (A2000)

    Dave,

    Isn't it easier to add another text box displaying the value you want?

    If you want the control tip text to display variable information, you must do this in code. The ControlTipText property is just a string - if you enter an expression in the Properties window, the text displayed will be the expression, not its value.

    You must change the ControlTipText in the OnCurrent event of the form and in the AfterUpdate event of each control that influences the value you want to display.

    For example (field, control and table names are just for illustration purposes):

    Private Sub Form_Current()
    UpdateToolTip
    End Sub

    Private Sub txtCarID_AfterUpdate()
    UpdateToolTip
    End Sub

    Private Sub UpdateToolTip()
    If Not IsNull(txtCarID) Then
    txtID.ControlTipText = DLookup("Model", "tblCars", "CarID=" & txtCarID)
    Else
    txtID.ControlTipText = ""
    End If
    End Sub

  3. #3
    Silver Lounger
    Join Date
    Jun 2002
    Location
    Cheadle, Staffordshire
    Posts
    2,177
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Control Tip Text (A2000)

    Thanks for the quick response Hans.
    Just been browsing the search files for this and found:-
    On Mouse Move
    Me.tglUnit01.ControlTipText = txtVehicle, or whatever.
    It didn't work for me anyway.

    I shall try your examples.

    A text box would be the easiest option, but not for what I need.

    I'm still working on the grid form, so am limited as to the amount of texts I can use.
    I've worked out a way to open an information form from double clicking the txtClientId's but am still looking at the imgClick routine for the 527 images cells.

    This is why you see, a control tip on mouse over would give me an insite as to more information behind the date range.

Posting Permissions

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