June 1999
Intermediate to advanced
1368 pages
29h 45m
English
Reports and forms can use QueryDefs or SQL statements as a record source. If the record source will be changed based on complex criteria, it can be helpful to have the report pointing to a QueryDef that contains the SQL statement for the report. VBA code can change the QueryDef before opening the form or report rather than change it during the Form OnOpen or Report OnOpen event.
Creating the QueryDef ahead of time is advantageous because even before the VBA code is written to generate the real QueryDef, you can create a query with the fields that will be used on the final report and begin the report design. This allows you to develop the report and view data from existing tables until the VBA code ...
Read now
Unlock full access