View Report in Form View

  • Thread starter Thread starter Davee
  • Start date Start date
D

Davee

Guest
Is there a way to insert a command button to view a report after you enter data into a form, when you are viewing the report. If I insert a ViewReport Command button, it will go to the last report. I used a reference number on each form and then made a query that refernced the largest reference number. But if you have to go back and view a previous report, how would you show focus on that form in order to go straight to the relative report? In other words, how do you pick a form out of many and click a button to show the respective report? It always wants to go to the last report.
 
You need to save the updated data before you can see it in the report. The command is:
DoCmd.RunCommand acCmdSaveRecord
Put it at the beginning of the button's click event.

Look up the OpenReport method to see how you can provide a filter for the report so that it brings up the record you were viewing on the form.

[This message has been edited by Pat Hartman (edited 10-27-2000).]
 

Users who are viewing this thread

Back
Top Bottom