DataGrid in Access.

  • I am a SQL guys who spends very little time in MS Access.  I have a small project in Access where I will be using a form to build dynamic sql against the local jet database.  Upon clicking a command button I would like to go to the DB with something like

    rst=CurrentDB.OpenRecordset(strSQL)

    ...and then populate a DataGrid (embedded into the parent form) with something like DataGrid.RecordSource = rst

    Unfortunately, I can't seem to find a suiteable DataGrid control.  Maybe I'm missing a reference somewhere???

    Can someone offer a little help?

    Thanks in advance. RH

     

  • What you need is a subform control on a main form. The subform can be set to display as a datasheet (grid). Make a new form, open properties, set "default view" to datasheet. Drag and drop this form onto your main form, open properties on the subform control and set the parent-child relationship.

    To populate the datagrid with a disconnected recordset,  check this out:

    http://support.microsoft.com/kb/281998/EN-US/

    HTH,

    Sam

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply