Open record in DataSheet

  • Thread starter Thread starter Edwin Martinez
  • Start date Start date
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
 
Each line in a datasheet view is a record. Do want to open another form
that has that records displayed in a different manor?
 
Thanks Larry

The reason its that the table only have some fields and I want to open a new
form with all the data but it has to be a form made bu me because it will
have some Pie Charts and stuff but how I pass the ID of that record when I
open the new form.

Edwin
 
Edwin Martinez said:
The reason its that the table only have some fields
and I want to open a new form with all the data
but it has to be a form made bu me because it will
have some Pie Charts and stuff but how I pass the
ID of that record when I open the new form.

Open the Form with the DoCmd.OpenForm statement and check Help on the
WhereCondition argument of DoCmd's OpenForm method.

If you have lots of data (hundreds of thousands or millions of records) it
might be faster if you re-created the SQL string and passed it to your new
Form in the OpenArgs argument.

But, as far as I know, if you choose to view that Form in Datasheet view,
you will not see your Charts.

Larry Linson
 
Back
Top