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!

Reading cell values in grid

Status
Not open for further replies.

stanmurphy

Technical User
Oct 14, 2000
89
I am using a(n) SQL generated cursor to populate a cursor with all the appointments for a particular client from an Appointment table. Then I open a form and display the grid with the Recordsource set to the cursor. The fields displayed are clientid, apptdate, and appttime (for Client ID, Appointment Date and Appointment Time).

After the user selects a field in a particular row (a single appointment) they will then click a SELECT button on the screen. The SELECT button's click event should use the values displayed in the grid row to do a SEEK in a table (the same Appointment table used to populate the cursor for the grid) and open another form to display the details for that appointment.

How do I reference the values for the fields in the particular selected grid row so that I can use them in the SEEK?

For instance, if the grid displayed 10 rows and the user clicked on a field in the 3rd row, how would I capture the values of the fields in that row?

Thanks for reading this :)
 
How do I reference the values for the fields in the particular selected grid row so that I can use them in the SEEK?

It's the value in the "underlying" table you want to capture. You'll notice when you click on the grid, the record pointer "moves" (In the gray bar at the bottom, the record number changes). As a test (after that you can decide what to do with that value). Edit your grid and in the valid event of the textbox of the column1 put :
Code:
messagebox("This is the value"+transform(this.value))

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