printing reports

S

Smoki

Hi,
I have a problem with printing reports from form. I have a form with
subform, and I can choose something from combo box, then all fields on subfom
have been filled. I have a command button on form which opens report.
But, report always remember first value, like it doesn't see what I choose
in combo box!
What to do?
 
S

Smoki

But how to do that? Do I have to put some code in VBA, to refresh data,
before open a report? I put a command button (to prieview report), but as I
said, it is always opens report with first value from combo box.
 
B

bhicks11 via AccessMonster.com

Now this is assuming your report has the data source set up correctly. To
requery, in design view, click on the button that opens the report, click on
properties, select the events tab, click on the line that has something on it
- probably ONCLICK. That will open the VB editor. Add this line just before
the line that opens your report:

DoCmd.Requery "form or query name goes here"

Bonnie
http://www.dataplus-svc.com
But how to do that? Do I have to put some code in VBA, to refresh data,
before open a report? I put a command button (to prieview report), but as I
said, it is always opens report with first value from combo box.
Before you open the report - requery (either in VBA or a macro).
[quoted text clipped - 8 lines]
 
Top