I am trying to get Access set up so that a user can submit a form to update a table. A report is connected to that table. When the user clicks on the submit button, it calls a macro that saves the report as a PDF and emails it. I want the report to only show the last record and not all records. The easiest way I found to do that was to put the report fields in the footer and to have it set to display records in descending order on the primary key.
The problem I'm having is that when I open the report in Report View, it looks fine. When I click on the Submit button, the PDF is showing the 2nd record, not the last record. I tried adding to the macro to have it open the report and then save and close it, but it's still saving the PDF on the 2nd record and I have no idea where that's coming from and why it's doing that.
Can someone please tell me how to fix this so that the PDF is displaying what the report is currently set to display? I can't figure why it's doing this.
The problem I'm having is that when I open the report in Report View, it looks fine. When I click on the Submit button, the PDF is showing the 2nd record, not the last record. I tried adding to the macro to have it open the report and then save and close it, but it's still saving the PDF on the 2nd record and I have no idea where that's coming from and why it's doing that.
Can someone please tell me how to fix this so that the PDF is displaying what the report is currently set to display? I can't figure why it's doing this.