Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

retrieving cell contents of dbgrid

Status
Not open for further replies.

daughtery

Programmer
Dec 12, 2006
66
US
I have a DBGrid that has 5 rows and 5 columns. How can I retrieve (Get) the value that is held in the 5th row 5th column?
 
dbGridName.Row = 5
dbGridName.Col = 5
YourVariableName = dbGridName.Text

Just be careful that you Dim your variable with a compatible
data type as stored in the grid...

Outside of a dog, a book is man's best friend. Inside of a dog it's too dark to read.
 
>dbGridName.Row = 5

This may not produce the expected results if there are more rows than visible.

dbGridName.Row = 5 is only the firth row of the visible rows, not the fifth row in the entire set of records.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top