displaying data

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
 
B

Brendan Reynolds

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top