J
JessiRight77
I have a form with several tab controls. I also have a subform on the
main form.
I have placed a command button on the main form that calls a macro that
print-previews a report for the individual record that is currently
displayed. This works fine, EXCEPT I cannot figure out how to make the
macro also refresh the form before it displays the report for a
new/revised record.
I have tried:
1. inserting a "Requery" command (with no argument) before the
"OpenReport" command... but this displays the report for the FIRST
record, not the current record.
2. adding the name of the tab control to the argument section of the
Requery command... but this doesn't work either.
3. making the macro close and open the form... but when the form
re-opens it displays the report for the FIRST record.
With regard to attempt #3, I also thought about making the macro assign
the primary key of the current record to a variable before it closes,
so it can go back to that record when it re-opens... but I don't know
how to do that.
Any thoughts or suggestions?
Thanks,
Jessi
main form.
I have placed a command button on the main form that calls a macro that
print-previews a report for the individual record that is currently
displayed. This works fine, EXCEPT I cannot figure out how to make the
macro also refresh the form before it displays the report for a
new/revised record.
I have tried:
1. inserting a "Requery" command (with no argument) before the
"OpenReport" command... but this displays the report for the FIRST
record, not the current record.
2. adding the name of the tab control to the argument section of the
Requery command... but this doesn't work either.
3. making the macro close and open the form... but when the form
re-opens it displays the report for the FIRST record.
With regard to attempt #3, I also thought about making the macro assign
the primary key of the current record to a variable before it closes,
so it can go back to that record when it re-opens... but I don't know
how to do that.
Any thoughts or suggestions?
Thanks,
Jessi