I have a form that is a search form. The form has drop down lists of field names and a text box where they can type search keywords. For each search field/value there is a drop down list of booleans (and, or, not). When the user hits the search button, the selections generate a query string that is then run:
Set qdf = CurrentDb.QueryDefs("temp_query")
qdf.SQL = SQL_query_string
DoCmd.Close acQuery, "temp_query"
DoCmd.OpenQuery "temp_query", acViewNormal, acReadOnly
SQL_query string
is generated based on the field/value combinations.
The code above creates a new query, temp_query
, which runs SQL_query string
. Rather than opening a new query pane, I would like to display the query results in the form as a datasheet (table). I thought a subform might be the answer, but there doesn't seem to be a datasheet format. How do I do this?
This seems to be the best alternative, but I'd like something that looks/acts more like an actual datasheet.
Me!DatasheetView.Form
doesn't seem to have aRecordSource
property. – abalter