|
-
Oct 27th, 1999, 08:55 AM
#1
Thread Starter
Hyperactive Member
How do you know which record was selected in a DataGrid? I have programmatically linked the datagrid to a recordset of two joined tables. I think in the click event for the datagrid I should be able to use the bookmark, or the row, to ascertain which of the records was clicked on.
From there I want to pick up two of the elements of the recordset, and create a new join based on the two values.
This works with a combobox by using the index property - on a click, I set a variable equal to the index, move to the first record, and then count through to the one I want.
This seems like it should be just as easy with a datagrid - but I am baffled and bamboozled!
-
Oct 27th, 1999, 01:41 PM
#2
Lively Member
When you click datagrid to select a row, the record you mark becomes current and recordset pointer automatically skips to it. You don't have to write any code to determine it
-
Oct 29th, 1999, 11:38 AM
#3
Frenzied Member
I use dbgrid, which allows you to specify the column value to select data. For example:
sID = form.dbgrid.columns(0).value
sets sID to whatever is stored in the selected row, column 0. You just need to know what columns you're interested in...
[This message has been edited by JHausmann (edited 10-30-1999).]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|