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!

Grid activerow and activecolumn question 1

Status
Not open for further replies.

stanmurphy

Technical User
Oct 14, 2000
89
Hello all,

Just out of curiosity, I placed two text boxes on my form and placed code in my grid.click event as follows:

*********************
thisform.text1.value = thisform.grid1.activerow
thisform.text2.value = thisform.grid1.activecolumn
thisform.refresh()
*********************

But when I run the form, the text boxes only show 0's when I click on a cell in the grid (single column grid).

Why is that?
 
smurphy

But when I run the form, the text boxes only show 0's when I click on a cell in the grid (single column grid).

Because prior to clicking on the grid the textboxes do not have a value assign to them...
If you need to show 0s before you click on the grid, assign the value of the texboxes in the init of the form.
Or I'm I reading this wrong? Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first
 
What I meant was that when I select a cell on the grid, the text boxes do not display the activerow and activecolumn numbers in the text boxes like I want.
 
smurphy


I would use the click event of the textboxes in the columns, and put this code:
Code:
thisform.text1.Value = this.parent.parent.ActiveColumn
thisform.text2.Value = this.Parent.Parent.ActiveRow

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top