I'm creating a simple database with a form; the form is used to fill and/or view the contents of the records of the only table in the database.
I've created a subform with datasheet view on the form, but that's only displaying the records which is shown in the form. But what I want is that this subform displays all records in the table, which enables me to easily scroll/browse through the records in the table and select the record of which I want to view the contents in the main form.
It's probably a very easy question for you, but I can't make it happen...
your kind of doin' it the wrong way. in general you would select the record in the main form and display the detail in the subform.
but as you want to have a datasheet view you gotta do it the hard way :
don't connect the main and the sub by "link child/master field".
to control the main form from the sub you gotta put some code in the current event of the sub form
.filter = .... (set ID-field of main to selected record of sub)
.filteron = true
Create a main form with 2 buttons on it call one form view and the other datasheet view. Place a sub-form on the main form and set the source object to the data sheet. In the OnClick event of the Form View button put this code: