Thanks Salad,
That may be part of the solution but I think I'm still missing something
important before I can use that property.
I assume that when a query is run (or even just opening a table in datasheet
view I would think) that Access must create its own recordset to display the
records in that datasheet. It would be that recordset that I need to get
ahold of in code to work with. I tried setting my own recordset to the same
query as to what the subform datasheet is set to display but it would appear
the datasheet and my recordset are not 'linked'. For example, in the click
event in one the fields/columns textbox I displayed a message box to display
the value in that field. If I clicked in different records/rows, I get the
same value displayed as the first record. So the 'current record' in my
recordset is not responding to where I click on the datasheet.
I hope that gives the idea of where I'm coming from. In short, I can't
(don't know how) to detect which row has been clicked in code. The
AbsolutePosition property would seem to be a property of a recordset. I
don't know where this recordset is or how to create it?
Thanks,
Gord
"Salad" <oi*@vinegar.comwrote in message
news:sZ******************************@earthlink.co m...
Gord wrote:
>If I have a form open with a subform control on it in datasheet view that
has its record source set to a query or a table, is it possible to
determine which record the user has clicked into with VB? I don't mean
the text box with which you can determine the field/column, but the
record (row). I guess what I'm looking for would be the bookmark? (or
some line numbering?) or whatever information would aid in determining
unambiguously which record in the underlying table was being accessed.
Hope that makes sense. Any pointers would help as I have a couple of
books I can refer to and the online help to work out the details.
Thanks,
Gord
P.S. I'm using Access 2007
You might want to check out AbsolutePosition and any code examples in
help.