Hide label if field doesn't exist

  • Thread starter Thread starter Lee Stafford via AccessMonster.com
  • Start date Start date
L

Lee Stafford via AccessMonster.com

Actually, there are more issues than that.
I am using Duane H.'s QBF (a great tool to make queries). I want to create
a report based on this query. The query changes depending on the table and
fields that are chosen. I would like to be able to put all the available
fields on the report, and only make visible the ones that are asked for in
each report.

Basically the report is designed dynamically. Without the user getting into
the design window. Can someone help?

Thanks a lot. The help on here is wonderful.
Lee
 
There is code behind the cmdReport command button that builds a SQL
statement based on the selected fields, where clause, order by, etc. You
could change the list of selected fields to all fields(*).

There is a line:
strSQL = "Select " & strFields & strFrom & strWhere & strGroupBy &
strOrderBy & " ;"
that you could try to change to:
strSQL = "Select * " & strFrom & strWhere & strGroupBy & strOrderBy & " ;"
 
Back
Top