I want to open a record vwhen I click it in data sheet mode
If you feel compelled to display in Datasheet View, create a Form (you can
do it with the Form Wizard for tabular Form) that displays a list of all the
records, set the click event of each control and the detail section to
"=OpenDetail()" without the quotes, then View Code and put a Function in the
General section of the Form's code that uses the UniqueID of the record to
open a Form in Detail View.
Now, go into the Property Sheet, Format Tab, of the list Form you created,
and set its Default View to Datasheet.
Even so, you will have to open the Form, not just Open the table. There's no
support for a Click event on a Table opened in Datasheet View, so you cannot
accomplish what you want in that circumstance.
Frankly, I would just create a Continuous Forms view of enough of a subset
of the data to choose, set the Click event as above, and not do the
Datasheet View part.
Larry Linson
Microsoft Access MVP