[AccessD] Question on Refreshing Data on Access 2007 Report (with Sub-Report)

Arthur Fuller fuller.artful at gmail.com
Sat Nov 10 09:44:40 CST 2012


I guess it's a matter of opinion, but I think that your "logical sequence"
is wrong. Instead of adding buttons to the report, each opening a small
form, I would begin with a form containing the buttons, plus a
Print/Preview button. That way, the user could filter on more than one
criterion, or skip the filtering and simply hit Print. Also, the user could
close the preview window and be returned to the Filtering window, to make
new choices, and then you could open the report again.

Arthur


On Sat, Nov 10, 2012 at 8:24 AM, Brad Marks <BradM at blackforestltd.com>wrote:

> All,
>
> We have a report that is pulling data from two separate databases via ODBC
> (Pervasive and Firebird).
>
> The "parent" report is pulling data from the Pervasive database and a
> sub-report is pulling data from the Firebird database.  This is
> accomplished via two separate queries.  This works very nicely.
>
> Recently there has been a request to add a feature that would enable our
> Sales Staff and Customer Service Reps to specify data that would "filter"
> the information that they are shown on the report.
>
> To provide this feature, I have added several buttons to the report.  Each
> of these buttons opens up a little form which is used to obtain the string
> that the users would like to use for their filter.  When the button on the
> "Filter Form" is pushed, a VBA routine is invoked.  This VBA routine
> changes the query-defs of the two underlying queries.  If I look at the
> underlying queries, I can see that they are being changed correctly and
> they are returning the data correctly.
>
> The catch is that the data shown on the report is not automatically
> changed.  I thought that invoking a "Requery" would refresh the data on the
> report after the data returned by the changed queries has been updated but
> it does not do so.
>
> The only way that I have been able to get this to work is to close and
> re-open the report after the two query defs have been changed by the VBA
> code.  This works, but I am curious if there is a better solution.
>
> Thanks,
> Brad
>
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>


-- 
Arthur
Cell: 647.710.1314

Prediction is difficult, especially of the future.
  -- Niels Bohr


More information about the AccessD mailing list