Re: Display query results in datasheet subform



All you should need to do is set the SourceObject of the subform control to
your query name
Dim strYourQuery
strYourQuery = "qselYourQuery"
Me.subformctrl.SourceObject = "Query." & strYourQuery

--
Duane Hookom
MS Access MVP

"JoeA2006" <JoeA2006@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E948993C-266E-48C7-A94A-AA16CD89F15F@xxxxxxxxxxxxxxxx
I need to allow users to drill down to records based on 3 criteria.
Location,
Date and Transaction category. I have set up three combo boxes and a
parameter query against a query based on the value of the three combo
boxes.
The query selects the correct records, however I need to display the
resulting records on the form(subform) in datasheet view. I have a
command
button to run the query once the combo box selections are made but the
results are displayed in a separate data sheet view but not on the form. I
also need for the user to add, edit records once they have drilled down to
the correct date location and category. Thanks



.