Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

tool tip text in dbgrid

Posted on 2000-05-15
2
Medium Priority
?
369 Views
Last Modified: 2008-02-01
well i have a db grid with 2 columns and i want that hen the user moves the mouse over the dbgrid the tool tip text should change according to the text in the cell

eg when the mouse is on name

xyx the tool tip text should show xyz
and if on vnv
then it chould change accordingly

thanx a lot
0
Comment
Question by:sonalchouhan
2 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 40 total points
ID: 2810083
Add this to your form code containing the dbgrid. It changes the tooltip text to reflect the contents of the cell over which the mouse is positioned.

Private Sub DBGrid1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    On Error Resume Next
    With DBGrid1
        .ToolTipText = .Columns(.ColContaining(X)).CellValue(.RowBookmark(.RowContaining(Y)))
    End With
End Sub
0
 

Author Comment

by:sonalchouhan
ID: 2810388
WELL THANKS TimCottee  I GOT MY ANS SOLVED

THANX A LOT
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question