displaying data

  • Thread starter Thread starter bill
  • Start date Start date
B

bill

What is a good way of displaying data from dynamically created SQL?

The SQL is created based on user selections, so I can't have controls on a
form or report bound to fields in the resultset in advance.

The way I'm doing it now is by creating a view dynamically based on the SQL,
and then using DoCmd.OpenView. The trouble with this approach is I need to
clean up the views periodically.

Thanks
Bill
 
Assign the SQL statement to the RecordSource property of the form or report.
If the fields included can change, then you will also need to assign the
names of the selected fields to the ControlSource property of the individual
controls. If the number of fields selected can change, create enough
controls to display the maximum number of fields, and toggle the Visible
property to hide unused controls.
 
Back
Top