So I have a form that when the "Save and Create new Record" button is clicked it will send an email of the current form and open up a new blank form.
What I have done so far is made a query of the form with all the controls, and I have copied my form as a report which uses the query as the record source. I'm using the following Do Cmd to send the report as an email when the button on the form is clicked.(the report basically looks exactly like the form).This works pretty great, however it sends all the records. So I have tried to put criteria on the query, under the Primary Key called RecordNumber, as follows: Forms![Cross Tee]![RecordNumber] Here's a screenshot below:Code:DoCmd.SendObject acSendReport, "Cross Tee", acFormatPDF, "email@email.com", , , "Test", "testing", False
This just leaves my query to look like this and thus my report blank:
I did try to work around this and sort by Descending RecordNumber on the query and limiting it to 1 result. While this initially seemed to fix my issue, I realized when the button on the form is clicked it send the last record submitted and not the one the user is actually clicking the button on.
Any help I an get on this would be much appreciated! I'm not sure what I'm missing but I've come to no solution after working on it for days.
Thanks!!